Moving Scalix to a new server

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Moving Scalix to a new server

Postby bluemike » Mon Dec 05, 2005 11:29 pm

I want to move my entire Scalix server to a new computer. I need some guidance on how do to this. I want to avoid having to re-install Scalix, and re-setup all my config settings.

Is it possible to stop all services (i.e. Scalix, Tomcat, Apache, etc.), run a complete rsync backup, and then restore that to the new computers' root? Could it be that simple? If so, exactly what do I have to type to stop all these services?

Thanks!

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Tue Dec 06, 2005 10:06 pm

Hi Bluemike,

No, it is not that simple. If you try to restore from / then you will overwrite the OS on the new machine. Trying to tell you every file and you tracking them down and getting them in the right place etc. will take you far longer than an install of Scalix. The install takes only a few minutes.

Once you have the Scalix server installed again stop the Scalix server and tomcat then you can restore /var/opt/scalix and you will have your configuration restored including mailboxes, mail data etc. that have already been created.

Will the new machine have the same fully qualified domain name (FQDN)? If yes, then no problem. If no then you will want to see the discussion in the admin guide concerning changing the FQDN of the Scalix server. Also see the man pages for sxmodfqdn.

Best Wishes,
Don

deyjvu
Posts: 175
Joined: Tue Oct 25, 2005 6:48 am
Location: Australia

Do you use the Outlook connector?

Postby deyjvu » Tue Dec 06, 2005 10:38 pm

If you use the Outlook connector to this server you may also need to recreate your Outlook profiles and rules will not work when you first login (if you have any setup) so just reset/recreate these.

This is only required if you change the FQDN of the server, I believe?

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Tue Dec 06, 2005 10:39 pm

Hi Mike,

You definitely don't want to just rsync from the top down as you'll over-write all of your Linux machine specific files as well. If you're just trying to move to a machine with more memory and a faster processor, you may want to just swap the drive from the old machine to the new machine. However, if you're also looking to get a faster and larger drive, then you should get Linux running first, then install the same version of Scalix on the new machine. Once that's done and verified, you can down the old server and move the data to the new server. Make sure you preserve the owner and permissions of the files.

Now, assuming the new server has the same name as the old server, you should be able to start Scalix and begin using the new machine.

Thanks,
Rachel

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Wed Dec 07, 2005 3:50 pm

I had thought about just physically moving the hard drive, but the drive on the test server is already a few years old, so I think I had better take Don's advice and do a full re-install instead.

So I will to install and STOP both Scalix and Tomcat? So I don't have to spend precious seconds looking anything up myself :roll:, what do I type to stop those services? I was planning to give the new system a different hostname, but perhaps I will re-think that.

Regarding the movement of /var/opt/scalix (as Rachel mentioned), do I run a special command to export all this data, or is it just a copy/paste kind of thing?

kanderson

Moving...

Postby kanderson » Sat Dec 10, 2005 3:14 pm

Install Linux and Scalix on the new server.

Stop both services on both servers.

Stop Scalix with the command omshut.
Stop tomcat with /var/opt/jak*/bin/shutdown.sh

Assuming your Tomcat is in /var/opt/jakarta-whatever... (Just type "jak" and hit tab).

Then, go to your new server. Cd into /var/opt.

then type

scp -Crp root@old.server.ip:/var/opt/* .

That should recursively copy everything over and preserve the permissions. You'll be prompted for the root password on the old server to establish the ssh connection.

You'll also want /etc/opt/scalix. So you have the configs for SAC and SWA.

Kev.

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Mon Dec 26, 2005 7:25 pm

Kev,

I preformed the procedure you described, and the terminal window shows a bunch of data moving over. However, not all the data in the /vat/opt/ directory copied over. In particular the DATA folder didn't copy.

When I re-start Scalix and Tomcat, and then go into the SAC console, none of my users are there.

I made shure to shut down Scalix & Tomcat on both servers. And I typed the scp command in as you described. Did I miss a step?

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Tue Dec 27, 2005 1:57 pm

A few suggestions to improvide this procedure....

1. All the files in /var/opt/scalix are owned by user "scalix", group "scalix", so if you want to avoid permission problems, you should be creating the user and group with the same UID and groupid as on the old server, i.e. on the old server do

old # grep scalix /etc/passwd
scalix:x:101:103:Scalix User:/var/opt/scalix:/bin/true

101 is your user id, 103 is your group id. On the new Server, create user and group with the same parameters:

new # groupadd -g 103 scalix
new # useradd -u 101 -g 103 -c "Scalix User" -d "/var/opt/scalix" -m -s /bin/true

2. as it is faster, I would suggest using nfs between the two boxes:

On the old Server, export the old Filesystem:

In /etc/exports, add a line reading:
/var/opt/scalix new.server.hostname(ro,async,no_root_squash)

Make sure your nfs server is started:
old # /etc/init.d/nfs start
old # /etc/init.d/nfslock start

Make sure the FS is really exported:
old # exportfs -a

Check that the FS has really been exported:
old # showmount -e

On the new server, mount the filesystem over nfs
# mount -t nfs old.server.hostname:/var/opt/scalix /mnt

Copy over all the files, unmount
# cp -a /mnt/* /var/opt/scalix
# umount /mnt

3. I would only install your Scalix server now, using our normal installer; do a typical install; during install, it will say that there is only a message store and if you want to remove it; obviously, don't.

4. After installation, some configuration in /var/opt/scalix will still contain the old hostname. You need to fix this. One thing is to run the sxmodfqdn command:

new # sxmodfqdn -o old.server.hostname -n new.server.hostname

Another is to check the /var/opt/scalix/sys/smtpd.cfg config files and change.

Then, you should also check your mainode mapping by issueing the
new # omshowmnmp
command.

This will display something like:
gr old.server.hostname
saruman,bamail old.server.hostname

For each line, then issue a omaddmnmp command, in this example:
new # omaddmnmp gr new.server.hostname
new # omaddmnmp saruman,bamail new.server.hostname

Warning! If any of the names in the first column contains your server hostname, DON'T change this. This is your mailnode name, which, by default, will be based on the servers hostname. This SHOULD NOT be changed unless you want to end up with a lot of unrepliable email and lots of trouble down the road. It's only a name, after all.

After this, restart scalix.
omshut
omrc

Believe everything should work all right now. As said before, Outlook profiles are a likely source of trouble, you might need to rework those.

At best, give the new machine the same hostname as the old. This saves a lot of work. Give them different IP addresses. In that case, in all the NFS-related commands up there, use your server IP address instead of the hostname.

Note: old.server.hostname and new.server.hostname are supposed to be your fully qualified hostnames, such as scalix-server.us.company.com or so.

Note-2: the commands up there and file locations are RedHat; hope it's the same for SuSE in case you're using this OS. I didn't check.

Note-3: I typed most of this from my memory, so minor typos might apply - in general I think the procedure should be just fine!

Tell us how it went, cheers,
Florian.


You might also want to check all config files in /var/opt/scalix, i.e.
new # cd /var/opt/scalix
new # grep old.server.hostname *
new # grep old *

And if you find anything, correct it. Lik
Florian von Kurnatowski, Die Harder!

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Tue Dec 27, 2005 2:17 pm

I will try the procedure Florian, Thanks.

Your steps seem to be completely opposite from the others I've been given. For example, previous Scalix Support replies have indicated I should install Scalix as the first step, but you say I should install it only after I move my users' data. I will follow your advice, but am curious why the others advice is so different....


Thanks again...

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Tue Dec 27, 2005 5:18 pm

Well, somehow both pathes can lead to good results; however, as the Installer fixes up a number of configuration elements, I usually trust it to do the trick; and it is built to recognize an existing message store - which is probably a little-known fact.

I'll certainly admit that we don't do a perfect job in our documentation for such scenarios (which might also be needed in case of a desaster recovery), i'll ping our DOC guys a note about it...

cheers,
Florian.
Florian von Kurnatowski, Die Harder!

axsom1
Posts: 69
Joined: Tue Aug 17, 2004 12:31 pm

Postby axsom1 » Wed Dec 28, 2005 12:36 pm

Hey BlueMike,

Ive done this a few times and all I simply did was take the /var/opt/scalix directory from the old server and place it on the new server. I then ran the scalix installer and it sees the old message store and keeps all the config files.

Has worked well for me...maybe it isnt the best way to do it...but sure was simple.

John

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Wed Dec 28, 2005 5:39 pm

So would all the SWA settings also be in that directory? I thought they were somewhere else....

axsom1
Posts: 69
Joined: Tue Aug 17, 2004 12:31 pm

Postby axsom1 » Wed Dec 28, 2005 5:52 pm

Yes they are in another directory.

For me they are in /etc/opt/scalix/webmail. I thought the installer actually asked you the webmail questions for domains and stuff like that...but I can't remember 100%. This has never been an issue though since we run webmail through another application server.

I should aslo have noted that when I did it, the new server was setup identically from an OS perspective as the old one (well with the exception of hardware, like larger partition sizes and so forth).

Are you planning on renaming the server or changing the mailnode name?

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Thu Dec 29, 2005 3:48 am

Again, I would strongly suggest keeping the mailnode name, whatever it is; it is possible to change it, but it will be a more major excercise without much benefit.

SWA settings are stored in /etc/opt/scalix/webmail/partner.xml - you might want to copy that file over. The installer will only replace the hostname in the file (important!) and the default SWA language setting (German/English). There are a few other customization options that can only be set in the file.

Same is true for /etc/opt/scalix/caa/scalix.res/ubermanager.properties, which contains some preferences for the Scalix Admin Console.

Cheers,
Florian.
Florian von Kurnatowski, Die Harder!

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Thu Dec 29, 2005 11:42 am

Well, I was going to change the name of the server. But after all this doom and gloom, I beleive I will leave it alone. I am going to try (again) to move the server this weekend. I'll let you know how it goes.....

THanks for all your help ^_^


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 7 guests