Changes

Jump to navigation Jump to search
Line 93: Line 93:     
'''Traduction en cours'''.
 
'''Traduction en cours'''.
 +
 +
=== Copying data ===
 +
Run the Affa job on the <code>newIP</code> box
 +
 +
affa --run prodserv
 +
 +
Depending on the amount of data and the speed of hardware and network this first job run can take a really long time.
 +
 +
Now view the file <code>/var/affa/prodserv/rpms-missing.txt</code>
 +
 +
less /var/affa/prodserv/rpms-missing.txt
 +
 +
You will find a list of RPMs which are installed on <code>prodIP</code> but not on this server (<code>newIP</code>) and also RPMs installed with different versions. Install or update the listed RPMs. To verify, you can run the steps of this chapter again. Finally the rpms-missing.txt should not list any RPMs.
 +
 +
In case you are upgrading the SME operating system to a higher version you may not only find the contribs installed in this list but all changes between the 2 systems - in this case you need to run this command on <code>prodIP</code>
 +
  /sbin/e-smith/audittools/newrpms
 +
To find out what contribs are installed on <code>prodIP</code>.
 +
 +
=== Final data synchronization ===
 +
Ask your users to log off.<br>
 +
Log into the <code>prodIP</code> box and stop all services that can modify data.
 +
 +
SVC='qpsmtpd sqpsmtpd crond pop3 dovecot pop3s ftp httpd-e-smith atalk smb qmail'
 +
for s in $SVC; do service $s stop; done
 +
 +
'''''Note:''' Downtime of the production server starts here''
 +
 +
Log into the <code>newIP</code> box and run the Affa job again
 +
 +
affa --run prodserv
 +
 +
This run will complete very quickly as only differences since the the last run needs to be synchronsized.
 +
 +
=== Switch over to the new hardware ===
 +
Log into the <code>prodIP</code> box and power it off
 +
 +
poweroff
 +
 +
 +
Log into the <code>newIP</code> box and rise this server to your production server
 +
 +
affa --rise --all prodserv
 +
 +
This action will complete very quickly as only hardlinks are used and no data is physically moved.<br>
 +
 +
'''''Note:''' Do not be scared if your prompt looks different!<br><br>
 +
 +
Now do a reboot
 +
 +
reboot
 +
'''''Note:''' Downtime of the production server ends here''
 +
 +
 +
You now have an identical copy of your old production server running on the new hardware. Your users can now log on.
 +
 +
=== Cleaning up ===
 +
Remove the Affa archives
 +
 +
/bin/rm -rf /var/affa
 +
 +
Remove the Affa packages and all status and configuration data
 +
 +
yum remove smeserver-affa perl-Filesys-DiskFree
 +
rm -f /etc/cron.d/affa-status /etc/cron.d/affa
 +
rm -rf /home/e-smith/db/affa /home/e-smith/db/affa-report
 +
rm -rf /var/log/affa
 +
 +
'''Note:''' Don't forget to clean up /var/affa. Otherwise you will waste disk space and see strange quota reports. See this [http://forums.contribs.org/index.php?topic=40737.msg198064#msg198064 forum thread] for details.
 +
 +
=== Additional information ===
 +
==== Performance ====
 +
With this method you should be able to move a typical 500 Gbyte sized server to new hardware with downtime less than 20 minutes. The final sync and the rise time does not really depend on the total files size, but on the number of files and directories.
 +
 +
 +
[[Category: Howto]]
 +
[[Category: Backup]]
 +
----
3,054

edits

Navigation menu