moving scalix

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

Mouseclone
Posts: 209
Joined: Thu Nov 02, 2006 12:02 pm

moving scalix

Postby Mouseclone » Tue Mar 13, 2007 11:04 am

I know I have been posting a lot lately but getting ready for the final move before we purchase the SB edition.

This morning I needed more space for the staging server because people enjoy using there email server as a place to just store emails. So what I did was mount a drive on the server and stopped processes: scalix, scalix-tomcat, scalix-postgres. Then I rsync-ed the drive mount point with /var/opt/*. Then unmounted the drive and remounted it back in /var/opt/ and started the services again.

Everything is working fine that i can tell.

My Q is if that went well is it possible for me to just tar /var/opt/ and move it to the new server? or do an rsync over the network? The servers right now are the same version and i would just need to make sure that the IP address and DNS setting were correct when i bring the server back up and running.

Are there some pitfalls that i should be looking for if doing the move this way?

Kris
Posts: 247
Joined: Tue Jul 04, 2006 7:24 am

Postby Kris » Tue Mar 13, 2007 11:17 am

As long as you make sure that the file permissions don't change, you'll be fine ;)

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Wed Mar 14, 2007 8:15 am

More importantly, ownerships mustn't change. Tar the mailstore, then make sure the remote machine has a user and group called scalix (preferably with the same G/UID, though not important), as well as sxadmin, and you're good to go. Once the mailstore is transferred and extracted you can install Scalix as normal.

If you manage to destroy the permissions you can always use omcheck to fix them.

Mouseclone
Posts: 209
Joined: Thu Nov 02, 2006 12:02 pm

Postby Mouseclone » Wed Mar 14, 2007 9:14 am

You say the mailstore. Do you mean /var/opt/scalix/<nn>/ ? I did an RSYNC from one server to the other via SSH. This copied everything from SERVER-A:/var/opt/scalix/ to SERVER-b:/var/opt/scalix/.

Currently my webmail is broke. Guess i need to start over and read more documentation on this. The <nn> directories are different because the machine names are different. But the servers were set up the same way.

/shrug.

Kris
Posts: 247
Joined: Tue Jul 04, 2006 7:24 am

Postby Kris » Wed Mar 14, 2007 9:20 am

Perhaps this howto about changing the hostname is usefull for you?

http://www.scalix.com/wiki/index.php?title=HowTos/ChangeFQDN

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Wed Mar 14, 2007 9:37 am

/var/opt/scalix/??/s is the mailstore, but you can copy the whole /var/opt/scalix.. You MUST preserve ownerships and permissions, so you need to give rsync the correct parameters for this.

The <nn> is made up of the first and last characters of the hostname (so scalix will become sx). I suggest you go through the files in /var/opt/scalix (except s) and change all the hostname references to your new hostname. And use the sxmodfqdn script to change it inside the mailstore (as described in the previous post).

Mouseclone
Posts: 209
Joined: Thu Nov 02, 2006 12:02 pm

Postby Mouseclone » Wed Mar 14, 2007 11:16 am

So I just want to get this straight.

Install scalix on the new server.

tar/rsync the /var/opt/scalix/<nn>/s/ to the new server and preserve permissions.

Reason for install first is the new FQDN would already be set in all the files. Really just need the /var/opt/scalix/<nn>/s/ for the mailstore and users information.

Other than that it should work?

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Wed Mar 14, 2007 11:25 am

If you are on the same version of Scalix on both sides, that should work. However, I would transfer the mailstore first and then install, then run sxmodfqdn. This allows Scalix to include some information about the mailstore into its own config files (/opt/scaliix/global).

But you can test both and see which works better for you. It would actually be interesting to see what the best approach is in this case. In general I try to keep hostnames the same and just change IPs where-ever possible.

Kris
Posts: 247
Joined: Tue Jul 04, 2006 7:24 am

Postby Kris » Wed Mar 14, 2007 11:33 am

I have two servers running (one just for testing actually), both servers with the same hostname.

One warning when you do this: allways double check on which machine you're working! 8)

I once rebooted the test machine.. or.. I thought I did.. until the phone started ringing :lol:
To prevent that from happening again, I've changed the prompt of the test server so that I can see on what machine I'm working

Mouseclone
Posts: 209
Joined: Thu Nov 02, 2006 12:02 pm

Postby Mouseclone » Thu Mar 15, 2007 10:23 am

OK I did it.

this is what i did and the one problem that i currently have that i have not done any research on yet.

1) installed Scalix Server - the same version as the old server
2) shutdown scalix services.
.....service scalix-tomcat stop
....service scalix stop
....service scalix-postgres stop
3) rsync -arvlHpEAXogD root@server-A:/var/opt/scalix/<nn>/s/ /var/opt/scalix/<nn>/s/
.....Some switches of rsync my have over lapped
4) Restart scalix services
....service scalix-postgres start
....service scalix start
.....service scalix-tomcat start

Wow that was a little to easy what went wrong? The web works. but I can not see any users in SAC. I can how ever login as a user to the webmail and everything is just fine.

So the delema with a move like this thus far is not being able to see the uses in SAC. I'm sure this might be an easy fix. Will have to research and find out.
__________________________________________________________________

Here's the edit sense no one has replied yet.

When coping the /var/opt/scalix/<nn>/s/ to the new server the fqdn is not changed over from the mail stores. you will need to run a sxmodfqdn -o oldserver -n newserver to change the mail store to match the new fqdn. After that they all showed up in SAC and i'm a happy camper.

I'm not sure if coping the mail store first and then doing an install on top of that would change the fqdn of the mail store itself. That would be something for the dev team to answer.

As far as moving to a new server with a different fqdn just run the sxmodfqdn and your golden.

Now all I have left to do is IP changes and a cable move. After I do this again with both servers not running scalix to get a full sync with out mail being popped/delivered/deleted from the server.


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 13 guests

cron