Moving server from RHEL4 salix 11.0.3 to RHEL 5 scalix 11.3

Discuss installation of Scalix software

Moderators: ScalixSupport, admin

jplorier
Posts: 89
Joined: Thu Jun 14, 2007 6:51 am
Location: Montevideo, Uruguay
Contact:

Moving server from RHEL4 salix 11.0.3 to RHEL 5 scalix 11.3

Postby jplorier » Wed Jan 16, 2008 2:05 pm

Hi,

I'm trying to move my production server from RHEL4 scalix version 11.0.3 to a new server with new IP and new hostname.
I've followed many posts in the forum and wiki that describe different procedures for migrating, but none seems to get the job done.
Right now I've installed scalix and copied the old /var/opt/scalix/xx to the new /var/opt/scalix/yy, then runned ompatchom and some error about not been able to add a queue or acl for BB service made it fail.
Then I edited the files as described in HowTos/ChangeFQDN and tried to run ompatchom again with the same results. Tryed to start the services one by one but scalix-postgres didn't go up because had postgres 7.4 database with postgres8.1.x installed.
Then I tryied another post that claimed to get it working by erasing everything except fo the ~/xx/s directory and copied the fresh install folders that I had backed up. ompatchom didn't work again.
At las I uninstalled everything except for the server and reinstalled, as didn't work tryied ompatchom again and the same trouble.
Does someone knows how to move from one server to another without commiting suicide??
Thanks

mikevl
Scalix Star
Scalix Star
Posts: 596
Joined: Mon Feb 02, 2004 8:32 pm
Location: New Zealand

Postby mikevl » Wed Jan 16, 2008 4:21 pm

Hi

Yep you are certianly taking the longer route here. I would not do this.

My preference in your situation (Change IP and server hostname) would be to sxmboxexp from your old server and sxmboximp to the new server. This can be scripted and will cause you a lot less strife.

Of course unless there is good reason in your situation you CAN build the new Server with the same host name different IP. This may make it easier to doo what you.

The rest of your network does not know about the server hostname at any particular IP untill you tell it so by setting DNS records. Just a thought.

Mike

jplorier
Posts: 89
Joined: Thu Jun 14, 2007 6:51 am
Location: Montevideo, Uruguay
Contact:

Postby jplorier » Thu Jan 17, 2008 7:42 am

Hi Mike,

The thing is that you must have all the directory replicated in the new mail in order to inport the mboxes. So the way that appears in all the forums and wiki is doing some kind of fresh install and then migrate the mailstore from the old server and tune up some stuff to get it working back.
I must change both hostname and IP. I could manage to skip ip change, but in fact is the less of the pains so it's better start things from the bottom.
Scalix laks from an efective howto or tool to migrate from scalix to scalix, they focused too much in migrating from exchange to scalix than supporting their own migrations.

TO SCALIX TEAM:

I just bought a smallbusiness edition license and now I have to migrate my 11.0.3 comunity edition mailserver on clon pc and RHEL4 to the brand new IBM server with RHEL 5 and scalix 11.3 and I really surprise the lack of official support to this kind of migrations. There's no HowTos or info in the manual regarding to this kind of migration.
I think that you should take some more time to issue documentation on this matter.
Thank you very much.

jplorier
Posts: 89
Joined: Thu Jun 14, 2007 6:51 am
Location: Montevideo, Uruguay
Contact:

Postby jplorier » Thu Jan 31, 2008 12:49 pm

Well, I keep trying.

What I did now was to start over from the top but didn't change the hostname, just the IP.
I installed scalix, stopped the server and then changed the ~/scalix/xx directory for the old one. Then I ran ompatchom but received the same error than last time.
Tryied uninstalling the db that didn't start because of the different version among the old and the new and reinstalling the db from the installer. Now it starts, but the ompatchom still won't work with the BB

[OM 15785] Internal error detected - see the log files
ERROR: [OMINST 225] Could not add queue or acl for service BB

ERROR: Correct error and run the script /opt/scalix/bin/ompatchom

and also I still can't get the users with omshowu because it claims

omshowu : [OM 8028] User database error occurred

In the install log created by ompatchom there's no extra info, so this is it.
If anyone can help, I've searched many wiki and forum articles but it's really a mess and there's no warranty anything there work because most post are not concluded.
If the scalix team can help to make this a good example, well then cheers.

mikevl
Scalix Star
Scalix Star
Posts: 596
Joined: Mon Feb 02, 2004 8:32 pm
Location: New Zealand

Postby mikevl » Thu Jan 31, 2008 4:27 pm

Hi

Is your server connected to AD or standalone.

If it is connect to AD then the user import on the new server would take but seconds.

If your server is standalone then a simple script wil export / import your users.

If you insist on migrating the message store then the proceedure may be as follows.

Install the new OS on your new server. Old hostname, Old IP
Install 11.0.3 on the new server with new OS
On old server tar --preserve --same-owner -czf backup.tar /var/opt/scalix
On new server xta -xzvf the tar file
Then
http://www.scalix.com/wiki/index.php?ti ... s/ChangeIP
The test
http://www.scalix.com/wiki/index.php?ti ... ChangeFQDN

As always different people come up with inventive ways to use Scalix

It is impossibe to doument every possible permitation that people may think of and fully document that.

The documentation does exhist as indicated above.

Mike

jaime.pinto
Scalix Star
Scalix Star
Posts: 709
Joined: Fri Feb 23, 2007 6:50 pm
Location: Toronto - Canada

Postby jaime.pinto » Fri Feb 01, 2008 12:31 am

My little patch to the previous procedure, assuming everything on the older server is "self-contained" and within scalix standard setup (ie, no external ldap/AD, etc).
mikevl wrote:get the old server temporarily off-line, so the new one can take its place and utilize the same DNS information on the same network as the old
Install the new OS on your new server. Old hostname, Old IP (emphasis on Old hostname, Old IP)
Install 11.3.0 on the new server with new OS
make sure that everything works with a fresh install: SAC, SWA, OL client, IMAP, postgres , etc

MILESTONE 1: you know the new server works with scalix

use the scalix install script to *remove* the fresh install (this exercise is so that you know all the necessary OS rpm subsystems for scalix are already in place for the next steps)

On old server tar --preserve --same-owner -czf backup.tar /var/opt/scalix (assuming that you did this before getting the old server off-line)
On new server remove the fresh /var/opt/scalix and replace it with the one from the old server with xta -xzvf the tar file
Then do a 2nd install of 11.3.0 over the /var/opt/scalix mail store
run the fix permissions script
restart all services and check that they hold
reboot the server
make sure that everything works as it did on the old server: SAC, SWA, OL client, IMAP, postgres , etc


MILESTONE 2: you successfully migrated your server to the new hardware/OS

Then
http://www.scalix.com/wiki/index.php?ti ... s/ChangeIP

MILESTONE 3: you successfully changed the IP

http://www.scalix.com/wiki/index.php?ti ... ChangeFQDN

MILESTONE 4: you successfully changed the FQDN

Post your experience
Last edited by jaime.pinto on Fri Feb 08, 2008 10:17 am, edited 1 time in total.
Image Jaime
||||||||||||||||||||||||||||||||||||||||

jplorier
Posts: 89
Joined: Thu Jun 14, 2007 6:51 am
Location: Montevideo, Uruguay
Contact:

Postby jplorier » Tue Feb 05, 2008 7:29 am

Almost there;

I have acomplished to get my mail server moved form the RHEL4 Scalix 11.0.3 to RHEL 5 Scalix 11.3 and different IP.

It's important to get things done one step at a time, otherwise, scalix is not able to manage all the changes to fix things up.

HOWTO:
- The new server has the same hostname than the old but new ip. This means /etc/hosts pints to the new ip

- Installed Scalix 11.3 as usually.

- OMSHUT scalix and stoped scalix-postgres and scalix-tomcat.

- cp -R -p old/message/store/xx /var/opt/scalix/xx. Note that as both the new server and the old one has the same hostname, the instance dirctory has the same name.

- Run scalix install again to remove scalix db (RHEL 5 uses postgres 8 and RHEL 4 uses postgres 7, so they don't get along)

- Run scalix install again to install scalix db

- Corrected the index to the new ip as described in http://www.scalix.com/wiki/index.php?ti ... s/ChangeIP

- run omcheck -s -d > /root/omcheck.sh to find permission problems

- sh /root/omcheck.sh to correct the prolbems found

- run ompatchom to fix the rest of the problems

- start all services and check it works.

ADDED

- Follow the steps in http://www.scalix.com/wiki/index.php?ti ... ChangeFQDN to change the hostname. I had no trouble at this time, but I recomend to pay much attention to change everything you need in the scripts to reflect your installation.

ADDED

After changing the hostname, sac stopped to work. I'm trying to fix it and then i'll post the solution. 'till now, none of the posts I found in the forums worked so I'll have to keep working


Thanks everyone for the help

FernandoRD
Posts: 10
Joined: Fri Dec 07, 2007 9:42 am
Location: Brazil
Contact:

Postby FernandoRD » Tue Feb 19, 2008 1:58 pm

if you do not have hundreds or thousands of accounts and have a lot of time , :D you can use imapsync, I successufly transfered some exchange accounts into scalix in a test enviroment here....

jplorier
Posts: 89
Joined: Thu Jun 14, 2007 6:51 am
Location: Montevideo, Uruguay
Contact:

Postby jplorier » Tue Feb 19, 2008 2:04 pm

Hi Fernando,

Now I already got it done (except for sac), so it's no use to try imapsync now. I'll have it in mind for the next try.
Thanks, :)

les
Scalix Star
Scalix Star
Posts: 819
Joined: Thu Feb 23, 2006 10:18 am
Location: Sydney, Australia

Postby les » Wed Feb 20, 2008 11:46 pm

jplorier wrote:
- Installed Scalix 11.3 as usually.

- OMSHUT scalix and stoped scalix-postgres and scalix-tomcat.

- cp -R -p old/message/store/xx /var/opt/scalix/xx. Note that as both the new server and the old one has the same hostname, the instance dirctory has the same name.

- Run scalix install again to remove scalix db (RHEL 5 uses postgres 8 and RHEL 4 uses postgres 7, so they don't get along)

- Run scalix install again to install scalix db



Just a note for all......

i also did this last night. However i didn't change ip's or hostnames, kept them the same.

The instructions above are great but with the postgres stuff there is an easier way.....

after installing a new scalix move it out of the way, then sync your old store.

Then go to /var/opt/scalix/xx
rename your old postgres to postgres.old
sync the postgres directory from the virgin install you did and moved out of the way.
then start scailx and scalix-postgres.

Of course you get an empty postgres db which will have to re-index everything.

Im not sure that running the installer to remove scalix db (and i assume you mean just removing the search and indexing component) is the best way, but it probably works fine.

On a side topic......

i've googled for answers to upgrading a postgres db from 7.4 to 8 and found nothing conclusive.

If anyone knows how that can be done that would be handy to share, especially if you have 28gb of mail to re-index.

At least then you may be able to keep all your old indexes....

i wonder what would happen if you try postgres 7.4 rpms on centos 5, then rpm -Fvh them to 8. will the databases be upgraded?
Regards,

Les Stott


Return to “Installation”



Who is online

Users browsing this forum: No registered users and 4 guests