From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
acesuares
Posts: 39
Joined: Sat Sep 13, 2014 12:21 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby acesuares » Wed Oct 20, 2010 7:39 am

# The challenge: move zimbra open source edition off my oldserver to my new server.

# Old server: Ubuntu 8.04 32 bit 6.0.4_GA_2038

# New server: should become Ubuntu 10.04 64bit 6.0.8_GA_2661

# Steps (this is not a recipe. Just test and test and test first!)
### ON THE OLD SERVER

# make full copy on new machine

DEST="new.server.tld:/opt/"

# Live sync before stopping Zimbra to minimize sync time with the services down

# you need to have SSH leys in place of course.

rsync -essh -avHK --delete /opt/zimbra/ $DEST/zimbra 2>&1 >/tmp/zimbra-backuplog-1

# stop Zimbra

/etc/init.d/zimbra stop

# Kill any orphaned Zimbra processes

pkill -9 -u zimbra

# rsync the changes (a lot less then in previous run!!)

rsync -essh -avHK --delete /opt/zimbra/ $DEST/zimbra 2>&1 >/tmp/zimbra-backuplog-2

# needed later for ldap

/opt/zimbra/libexec/zmslapcat /tmp

scp /tmp/ldap.bak $DEST

scp /opt/zimbra/data/ldap/hdb/db/DB_CONFIG $DEST

exit
### ON THE NEW SERVER

# download 6.08

# wget whatever, tar something, cd to the installer dir, then:

./install.sh --softwareonly

/opt/zimbra/libexec/zmfixperms --verbose
#Then follow this recipe (from Exporting and Importing Zimbra LDAP Data » Zimbra :: Blog)

#To dump on the 32-bit:

#/opt/zimbra/libexec/zmslapcat /tmp

#Which is essentially running ${zimbra_home}/openldap/sbin/slapcat -F ${zimbra_home}/data/ldap/config -b "" -l /tmp/ldap.bak.${D}

# WE DIT THAT ALREADY, in /opt there is ldap.bak and DB_CONFIG
#To import on the 64-bit:

rm -rf /opt/zimbra/data/ldap/hdb/*

# If this is an ldap master with replicas:

rm -rf /opt/zimbra/data/ldap/accesslog/*

mkdir -p /opt/zimbra/data/ldap/hdb/db /opt/zimbra/data/ldap/hdb/logs

# If this is an ldap master with replicas:

mkdir -p /opt/zimbra/data/ldap/accesslog/db /opt/zimbra/data/accesslog/logs

# Copy the file /opt/zimbra/data/ldap/hdb/db/DB_CONFIG from the 32-bit server to /opt/zimbra/data/ldap/hdb/db on the 64-bit server. Note: If this file does not exist, or is empty, creating it may improve performance.

cp /opt/DB_CONFIG /opt/zimbra/data/ldap/hdb/db

chown -R zimbra:zimbra /opt/zimbra/data/ldap

# Copy from the 32-bit server to the 64-bit server the /backup/ldap.bak file. WE DONE THAT

# now add ldap

/opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -cv -l /opt/ldap.bak.
# this is needed, why? well i can't tell why.

cd /opt/zimbra/zimbramon/lib/

mv i486-linux-gnu-thread-multi i486-linux-gnu-thread-multi-old

ln -s x86_64-linux-gnu-thread-multi i486-linux-gnu-thread-multi
# run fixperms again.

/opt/zimbra/libexec/zmfixperms --verbose
# UPDATE YOUR DNS SO old.server.tld points to the new IP.

# ALSO FIX /etc/hosts accordingly
# see http://www.zimbra.com/forums/migration/43748-solved-problem-migrating-6-0-8-ga-debian-4-32-bit-ubuntu-10-04-lts-64-bit.html

# needed for clamav, in the above docs it's called llibltdl7 (one l to much)

apt-get install libltdl7
/opt/zimbra/libexec/zmsetup.pl
### THAT IS IT? MAYBE. YOU NEED TO CHECK.

# also, change the IP number that is trusted! You can do that in the graphical admin

# console, under MTA, there is some ip numbers that are trusted (needed for webmail?)
### ON THE OLD SERVER

apt-get install redir

redir --laddr=0.0.0.0 --lport=25 --caddr=YOUR-NEW-IP --cport=25 --syslog &

# ADD A SIMILAR LINE FOR EACH PORT YOU WANT FORWARDED: 443, 993,

# 465, 110, 143, etc etc ONLY TCP!


Comments welcome.
Open Source, Open Content & Open Standards on Curaçao


acesuares
Posts: 39
Joined: Sat Sep 13, 2014 12:21 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby acesuares » Thu Oct 21, 2010 3:40 pm

After the upgrade, some problems surfaced. One of them was this one:
LibClamAV Warning: Detected duplicate databases /opt/zimbra/data/clamav/db/daily.cvd and /opt/zimbra/data/clamav/db/daily.cld, please manually remove one of them
IN this post Duplicate Database | ClamAV | users it's explained that both can be deleted. I went ahead and deleted the .cld files, these where the oldest.
acesuares
Posts: 39
Joined: Sat Sep 13, 2014 12:21 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby acesuares » Thu Oct 21, 2010 3:49 pm

After some checking in logfiles, I found that the freshclam log had been disabled since Oct 12, (this is thus not related to the upgrade).
--------------------------------------

Received signal: wake up

ClamAV update process started at Tue Oct 12 08:27:41 2010

WARNING: Your ClamAV installation is OUTDATED!

WARNING: Local version: 0.95.3 Recommended version: 0.96.3

DON'T PANIC! Read http://www.clamav.net/support/faq">http://www.clamav.net/support/faq

main.cld is up to date (version: 52, sigs: 704727, f-level: 44, builder: sven)

Trying host db.us.clamav.net (85.114.134.211)...

Downloading daily-12125.cdiff [100%]

Downloading daily-12126.cdiff [100%]

daily.cld updated (version: 12126, sigs: 139662, f-level: 53, builder: ccordes)

WARNING: Your ClamAV installation is OUTDATED!

WARNING: Current functionality level = 44, recommended = 53

DON'T PANIC! Read http://www.clamav.net/support/faq">http://www.clamav.net/support/faq

Log size = 1048600, max = 1048576

LOGGING DISABLED (Maximal log file size exceeded).

Log size = 1048685, max = 1048576

LOGGING DISABLED (Maximal log file size exceeded).

Log size = 1048770, max = 1048576

LOGGING DISABLED (Maximal log file size exceeded).

Log size = 1048855, max = 1048576

LOGGING DISABLED (Maximal log file size exceeded).

Log size = 1048940, max = 1048576

LOGGING DISABLED (Maximal log file size exceeded).

Log size = 1049025, max = 1048576

etc etc
Panchux
Advanced member
Advanced member
Posts: 52
Joined: Sat Sep 13, 2014 1:25 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby Panchux » Thu Oct 21, 2010 7:11 pm

Thank you for sharing your experience about migrating a server. It might be very helpful for many people.
Pancho
acesuares
Posts: 39
Joined: Sat Sep 13, 2014 12:21 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby acesuares » Sat Oct 23, 2010 1:52 pm

I removed the daily.cvd, daily.cld, main.cvd and main.cld files, (I left bytecode.cvd).

I also removed freshclam.log

and restarted clamav with

su - zimbra

zmclamdctl stop

zmclamdctl start
The result was that the daily and main files where 'up-to-date' (and bytecode too) and that freshclam started logging again.
acesuares
Posts: 39
Joined: Sat Sep 13, 2014 12:21 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby acesuares » Sat Oct 23, 2010 3:50 pm

After the upgrade, I got this message when going to statistices in the Admin Console.
Obviously, the server is an MTA.
But since the logger also doesn't work, maybe the problem is in there.
acesuares
Posts: 39
Joined: Sat Sep 13, 2014 12:21 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby acesuares » Sat Oct 23, 2010 4:51 pm

After the upgrade, there was an error logged (and I can't find where it was logged!):
[QUOTE]This RRD was created on other architecture[/QUOTE]
I looked in /opt/zimbra/logger/db/data/rrds and I found some .rrd files dated 20 Oct, which was the day of the migration/upgrade.
I googled and found this:

[rrd-users] This RRD was created on other architecture
But, apparently the .rrd's where only from one day, and nothing was logged in an rrd since 20 Oct, so I just deleted the files. Then I wanted to restart just the logger, and I tried zmloggerctl and zmlogswatchctl but didn't see any new .rrd files appearing.
So I restarted Zimbra, but stopping Zimbra hung at 'Stopping logger...' so I killed the logger process and then restarted zimbra. The .rrd files are now generated again.
In the Admin Console, Advanced statistics is visible again (it wasn't after the upgrade) but it contains no data...
acesuares
Posts: 39
Joined: Sat Sep 13, 2014 12:21 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby acesuares » Sat Oct 23, 2010 4:56 pm

After fixing the .rrd, it now also displays server status. It used to say "logging must be enabled' althoug the logger service was running.
1739miguel
Advanced member
Advanced member
Posts: 103
Joined: Fri Sep 12, 2014 10:11 pm

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby 1739miguel » Mon Jun 20, 2011 4:19 am

IMO this is one of the best informative threads I've ever seen on zimbra community, and helped me a lot in some migrations, Thanks for sharing acesuares
sksk
Posts: 2
Joined: Sat Sep 13, 2014 2:21 am

From 6.04 -> 6.08, Ubuntu 8.04 -> 10.04, 32bit -> 64bit

Postby sksk » Wed Dec 07, 2011 8:54 am

I needed to install the following packages

apt-get install libuuid-perl libuuid-tiny-perl libossp-uuid-perl libdata-uuid-libuuid-perl
install.sh (or zmsetup ?) produced an error not finding Data:UUID perl module. THe above packages fix the error

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 20 guests