Upgrade from ubuntu 12.04 to 14 8.7.1

Ask questions about your setup or get help installing ZCS server (ZD section below).
tpop
Posts: 5
Joined: Sun Mar 04, 2018 9:01 am

Upgrade from ubuntu 12.04 to 14 8.7.1

Post by tpop »

Ultimately, the goal is to get to 16 and 8.8.8 (or whatever is current).

I've tried a few times over the years to do an in place upgrade from Ubuntu 12 to 14 over the years and things have gone sideways resulting in me rolling back the VM to the pre upgrade snapshot. It's usually a problem with Ubuntu itself.

The latest attempt I just tried was to bring up an ubuntu 14.4 server, install the same version of zimbra that's on 12 (8.7.1 GA 1670) and then copy /opt/zimbra from 12 to 14 and re-run the install.sh script to bring things up.

I tar/gzip'd /opt/zimbra (42GB compressed down to 24GB) and copied it over to 14.

I started to un-tgz the file and then ran out of space on the 200GB that I assigned to the VMware VM.

How did I go from a 42GB set of folders down to 24GB TGZ and then have it balloon and run out of space in 200GB?
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by phoenix »

It's never a good idea to do an in-place upgrade of the O/S on any server and I'd suggest you run up a new server with the intended version plus the latest ZCS and do the move with the ZeXtras migration tool.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
User avatar
axslingr
Outstanding Member
Outstanding Member
Posts: 256
Joined: Sat Sep 13, 2014 2:20 am
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 UBUNTU18

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by axslingr »

I agree with Bill about in-place server upgrades but there's really no reason not to go with 16. Just spin up a new VM with 16.04 and install Zimbra(8.7.1) with the -s option. Get rid of the resulting /opt/zimbra directory, rsync your live /opt/zimbra with -avHK options so it will preserve the hard links. Run the install(8.7.1) again normally and install will treat it as an upgrade. Upgrade to 8.8.8 after that.

Lance
tpop
Posts: 5
Joined: Sun Mar 04, 2018 9:01 am

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by tpop »

Thank you for that.

I guess I've had it in my mind I was to go to 14.04 that all I did was put 16.04 at the end of the task chain in my head.

I have no idea why rsync didn't enter my mind this time.

Oh well, tonight's another night.
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 632
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by ccelis5215 »

phoenix wrote:It's never a good idea to do an in-place upgrade of the O/S on any server and I'd suggest you run up a new server with the intended version plus the latest ZCS and do the move with the ZeXtras migration tool.
The best and easy way to do this task...

ccelis
tpop
Posts: 5
Joined: Sun Mar 04, 2018 9:01 am

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by tpop »

axslingr wrote:I agree with Bill about in-place server upgrades but there's really no reason not to go with 16. Just spin up a new VM with 16.04 and install Zimbra(8.7.1) with the -s option. Get rid of the resulting /opt/zimbra directory, rsync your live /opt/zimbra with -avHK options so it will preserve the hard links. Run the install(8.7.1) again normally and install will treat it as an upgrade. Upgrade to 8.8.8 after that.

Lance
Thought I'd try it this way one last time.

What manner or sorcery is going on such that my 40GB /opt/zimbra folder ends up filling and running out of space on a 400GB partition using rsync?

Zextras method, here I come now.
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by phoenix »

tpop wrote:What manner or sorcery is going on such that my 40GB /opt/zimbra folder ends up filling and running out of space on a 400GB partition using rsync?
That could be caused by the fact the the LDAP db is created as a sparse file, when it's not copied correctly it is created on the destination server at it's full allocated size - I can't remember the exact file sizes but you should be able to find it with a search of the forums.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
tpop
Posts: 5
Joined: Sun Mar 04, 2018 9:01 am

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by tpop »

phoenix wrote:
tpop wrote:What manner or sorcery is going on such that my 40GB /opt/zimbra folder ends up filling and running out of space on a 400GB partition using rsync?
That could be caused by the fact the the LDAP db is created as a sparse file, when it's not copied correctly it is created on the destination server at it's full allocated size - I can't remember the exact file sizes but you should be able to find it with a search of the forums.
Ahh..

So if I rsync'd without the mdb files and then copied them manually with the mdb tool, I'll end up with actual sized files?

Will they still be subject to the 80GB (or whatever) default limit?

I'm still leaning to doing the migration this way without zextras simply because I would like it to happen as quickly as possible overnight for 80 e-mail boxes and multiple domains.

Copy the folders and files over, run a program only installation, renumber the VM and power it on.
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2796
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.6 Network Edition
Contact:

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by L. Mark Stone »

tpop wrote:
axslingr wrote:I agree with Bill about in-place server upgrades but there's really no reason not to go with 16. Just spin up a new VM with 16.04 and install Zimbra(8.7.1) with the -s option. Get rid of the resulting /opt/zimbra directory, rsync your live /opt/zimbra with -avHK options so it will preserve the hard links. Run the install(8.7.1) again normally and install will treat it as an upgrade. Upgrade to 8.8.8 after that.

Lance
Thought I'd try it this way one last time.

What manner or sorcery is going on such that my 40GB /opt/zimbra folder ends up filling and running out of space on a 400GB partition using rsync?

Zextras method, here I come now.
Depends on the rsync options you used (or didn't use). If you didn't preserve hard links, and one person sent a 20MB Powerpoint file to ten of his colleagues, you now have 11 x 20MB = 220MB of the same PowerPoint file instead of a single 20MB PowerPoint file on the old server and ten hardlinks.

The LDAP sparse file is 96GB so now you have a 96GB file on the new server you'll never get rid of. Much better to do slapcat on the old server and slapadd on the new server. There are several wiki articles on exporting/importing LDAP.

But really, the best method as mentioned above is to use the Zextras Suite to do the migration and go, in one step, from old-Zimbra+old-operating-system > shiny-new-latest-Zimbra+latest-operating-system.

Hope that helps,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
User avatar
axslingr
Outstanding Member
Outstanding Member
Posts: 256
Joined: Sat Sep 13, 2014 2:20 am
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 UBUNTU18

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Post by axslingr »

Dang I totally forgot about the database sparse file.

Code: Select all

rsync -avHK --delete --exclude 'data.mdb' /opt/zimbra /backup/directory/
/opt/zimbra/common/bin/mdb_copy /opt/zimbra/data/ldap/mdb/db /backup/directory/ldap
Post Reply