Changes

From SME Server
Jump to navigationJump to search
New page: === Introduction === There many ways to move a SME Server installation to a new hardware. This document describes a method using the '''Affa''' contrib. Affa makes it possible to move...
=== Introduction ===
There many ways to move a SME Server installation to a new hardware.
This document describes a method using the '''[[Affa]]''' contrib. Affa makes it possible to move with a minimal downtime of the production server. In the follwoing it is assumed that <code>prodIP</code> is the IP address of your production server and <code>newIP</code> is the IP address of the new server hardware. Replace both placeholders by your real IP adresses.

=== Preparation ===
==== Production server ====
Enable ssh access for your local network in the server-manager of <code>prodIP</code>.
Log into the <code>prodIP</code> box and run an update<br>
<code>
# yum update
</code><br>

==== New hardware ====
Install SME Server from the latest Cdrom/Iso. Assign an unused IP address (<code>newIP</code>) and disable DHCP.<br>
Enable ssh access for your local network in the server-manager of <code>newIP</code>.<br>
Log into the <code>newIP</code> box and run an update<br>
<code># yum update</code><br>
Download the '''''smeserver-affa''''' and '''''perl-Filesys-DiskFree''''' packages from [http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/affa/ one of the SME Server contrib mirrors].<br>

Install both packges<br>
<code>
# yum localinstall smeserver-affa*rpm perl-Filesys-DiskFree*rpm
</code>
Configure Affa<br>
<code>
# db affa set prodserv job
# db affa setprop prodserv remoteHostName prodIP
# db affa setprop prodserv RPMCheck yes
</code>
Generate DSA keys and send the public key to the <code>prodIP</code> server<br>
<code>
# affa --send-key prodserv
</code>

=== Copying data ===
Run the Affa job on the <code>newIP</code> box
<code>
# affa --run prodserv
</code>
Depending on the amount of data and the speed of hardware and network this can take a really long time.

Now view the file <code>/var/affa/prodserv/rpms-missing.txt</code>
<code>
# less /var/affa/prodserv/rpms-missing.txt
</code>
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.

=== Final data synchronisation ===
Ask your users to log off.<br>
Log into the <code>prodIP</code> box and stop all services that can modify data.
<code>
# SVC='qpsmtpd sqpsmtpd crond imap pop3 imaps pop3s ftp httpd-e-smith atalk smb qmail'
# for s in $SVC; do service $s stop; done
</code>

Log into the <code>newIP</code> box and run the Affa job again
<code>
# affa --run prodserv
</code>
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
<code>
# poweroff
</code>

Log into the <code>newIP</code> box and rise this server to your production server
<code>
# affa --rise prodserv
</code>
This action will complete very quickly as only hardlinks are used and no data is physically moved.<br>
Now do a reboot
<code>
# reboot
</code>

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
<code>
# /bin/rm -rf /var/affa
</code>


[[Category: Howto]]
----
501

edits

Navigation menu