Page 1 of 2

Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Sun May 20, 2018 2:19 pm
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?

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Sun May 20, 2018 2:33 pm
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.

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Sun May 20, 2018 11:26 pm
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

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Mon May 21, 2018 1:18 am
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.

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Mon May 21, 2018 3:12 am
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

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Mon May 21, 2018 11:21 am
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.

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Mon May 21, 2018 1:02 pm
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.

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Mon May 21, 2018 5:22 pm
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.

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Mon May 21, 2018 8:14 pm
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

Re: Upgrade from ubuntu 12.04 to 14 8.7.1

Posted: Tue May 22, 2018 11:18 am
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