Changes

From SME Server
Jump to navigationJump to search
Line 176: Line 176:  
===== Performance =====
 
===== Performance =====
 
Avec cette méthode, vous devriez être en mesure de déplacer un serveur d'une taille typique de 500 Gb sur un nouveau matériel avec une interruption de service de moins de 20 minutes. La durée de la synchronisation finale et de l'«élévation» ne dépendent pas tant de la taille totale des fichiers que du nombre de fichiers et de répertoires.
 
Avec cette méthode, vous devriez être en mesure de déplacer un serveur d'une taille typique de 500 Gb sur un nouveau matériel avec une interruption de service de moins de 20 minutes. La durée de la synchronisation finale et de l'«élévation» ne dépendent pas tant de la taille totale des fichiers que du nombre de fichiers et de répertoires.
 +
=== Using the backup and restore fonctions ===
 +
The general working way is to make a backup of the old SME and to restore it on the new SME (upgraded or not).
 +
The fonction "RPMCheck" can be used indirectly with the backup server (compare the list with the old and with the new hardware) to get the list of rpm's that are missing on the new hardware but it is not available for a backup on the external usb disk.
 +
 +
==== Preparation ====
 +
Take a backup of the running old 'prod server' (see the above conf file ''/etc/affa/prodserv.conf'' ).
 +
{{Note box| Like using the way based on "rise", your can take the first backup (takes long time) without stopping the services and the last one (is quick) after the logout of the users and the stop of the services }}
 +
After the backup, set a temporary IP into the conf file of the backup job:
 +
remoteHostName=tem.po.ra.ry.IP
 +
 +
For a backup on an external usb disk, set:
 +
remoteHostName=localhost
 +
RootDir=/the/mount/point/of/the/disk
 +
and mount the disk. You should make a list of the installed rpm's too.
 +
 +
==== Install SME on the new hardware ====
 +
Install at least the same version of SME you were running on the old hardware or a more recent one (e.g. from SME8 to SME9).
 +
 +
===== For the method based on a backup server: =====
 +
* Set the '''temporary IP''' as internal address of the new hardware
 +
* From the backup server create the ssh connection between the backup server and the new hardware by sending the ssh key:
 +
  affa --send-key prodserv
 +
 +
The answer from Prod-temp-IP server will be<br>
 +
Job prodserv: root@Prod-temp-IP's password:
 +
enter the root Prod-temp-IP password. The answer will be:<br>
 +
Public key sent to prod-temp-IP
 +
 +
===== External usb disk: =====
 +
* Install "smeserver-affa" on the new hardware
 +
* mount the usb disk on the same mountpoint than for the backup
 +
* go into the archive and copy the .ini file into /etc/affa as conf file:
 +
cd /mount/point/prodserv/scheduled.0
 +
ls -a  ### to see the ini file
 +
cp .prodserv.ini /etc/affa/
 +
mv /etc/affa/.prodserv.ini /etc/affa/prodserv.conf
 +
 +
===== In case of upgrade SME8 to SME9 =====
 +
The restoration of the default data (parameter "SMEServer=yes" into the conf file of the job) will configure yum repos for SME8 on the new server SME9!
 +
 +
In order to avoid this there are 2 possibilities:
 +
* make a copy of both folders ''/etc/yum.repos.d'' and ''/etc/yum.smerepos.d'' before the restore. It will be helpful for reconfiguring by hand the repos for SME9 after the restore.
 +
* add following into the conf file of the backup job:
 +
Exclude=/etc/yum.repos.d
 +
Exclude=/etc/yum.smerepos.d
 +
before the last backup (of course if you will restore from the last backup - scheduled.0 - and not from an older one like weekly.2!)
 +
 +
==== Restore the data ====
 +
 +
From the backup server (or from the new production server in case of restoring from external usb disk) run:
 +
affa --full-restore [--preserve-newer=no] [--delete=yes]  prodserv
 +
To get 1:1 the state of the backup.
 +
 +
'''Keep in mind that:'''
 +
:[--preserve-newer=no]: files on the remote server with modification time newer than on the backup are overwritten through the older ones of the backup.
 +
:[--delete=yes]: all files on the remote server, which are not in the backup, are deleted.
 +
 +
{{Warning box|A full restore with --preserve-newer no and --delete yes reconstructs the server as it was at the time of the backup. That means, that all files created or server configuration changes made before the restore will be lost! }}
 +
 +
After the restore, the new prodserver will reboot.
 +
 +
'''Note for the case of 3 machines:''' Make sure that the old hardware is switched off or no more connect to the network before the new hardware reboots because the new hardware will take its IP after the reconfiguration.
 +
 +
==== Tasks post restore ====
 +
 +
* If the backup job should be used for further backups of the new hardware, don't forget to replace the temporary IP of "Remotehost" through the previus set IP of the old server into the conf file of the affa job.
 +
* In case of an OS upgrade, check and if necessary reconfigure the repositories of yum for the new version.
     
3,054

edits

Navigation menu