Moving SME to new Hardware

From SME Server
Revision as of 14:57, 6 July 2007 by Mweinber (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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 prodIP is the IP address of your production server and newIP 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 prodIP. Log into the prodIP box and run an update

# yum update


New hardware

Install SME Server from the latest Cdrom/Iso. Assign an unused IP address (newIP) and disable DHCP.
Enable ssh access for your local network in the server-manager of newIP.
Log into the newIP box and run an update
# yum update
Download the smeserver-affa and perl-Filesys-DiskFree packages from one of the SME Server contrib mirrors.

Install both packges

# yum localinstall smeserver-affa*rpm perl-Filesys-DiskFree*rpm

Configure Affa

# db affa set prodserv job
# db affa setprop prodserv remoteHostName prodIP
# db affa setprop prodserv RPMCheck yes

Generate DSA keys and send the public key to the prodIP server

# affa --send-key prodserv

Copying data

Run the Affa job on the newIP box

# affa --run prodserv

Depending on the amount of data and the speed of hardware and network this can take a really long time.

Now view the file /var/affa/prodserv/rpms-missing.txt

# less /var/affa/prodserv/rpms-missing.txt

You will find a list of RPMs which are installed on prodIP but not on this server (newIP) 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.
Log into the prodIP box and stop all services that can modify data.

# SVC='qpsmtpd sqpsmtpd crond imap pop3 imaps pop3s ftp httpd-e-smith atalk smb qmail' 
# for s in $SVC; do service $s stop; done

Log into the newIP 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 prodIP box and power it off

# poweroff

Log into the newIP box and rise this server to your production server

# affa --rise prodserv

This action will complete very quickly as only hardlinks are used and no data is physically moved.
Now do a reboot

# reboot

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