Page 1 of 1

[SOLVED] Backup / Restore with tgz formatter

Posted: Thu Aug 27, 2009 5:39 pm
by Service
Hello,
I am using these 2 commands for migrating accounts from server 1 to server 2 (both in the same version) :
/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL “//?fmt=tgz” > /tmp/account.tgz

and
/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL “//?fmt=tgz&resolve=reset” /tmp/account.tgz

But now I want to use the same method for a 'update' operation on the same server for a test from version 5.0.18 to 6RC1
But it seems that the tgz file resulting in the backup on version 5 in not compatible with tgz for version 6 ???
As I can't use imapsync, what other tool I can use ?
Thanks.
PS : sorry, but this post should be in the 'Migration' forum.

[SOLVED] Backup / Restore with tgz formatter

Posted: Fri Aug 28, 2009 2:59 am
by Service
Can I just copy the 'store' folder ?
What will I loose if I use this trick ? I read that I may loose 'metadata', ok but what are metadata ?
With this trick, if think that the index is not copied too, is the index can be recreated ? what is it used for ?
And what about the database ? as between v5 et v6 schema as changed, I don't know how to reimport data from the database. Is it really important ?


Thanks.

[SOLVED] Backup / Restore with tgz formatter

Posted: Fri Aug 28, 2009 3:11 am
by Service
Here is the ouput that the version 6 gave me for a restoration of a backup of the version 5.0.18 :
ERROR: service.FAILURE (system failure: POST failed, status=500 system failure: tgz formatter failure)

com.zimbra.common.service.ServiceException: system failure: POST failed, status=500 system failure: tgz formatter failure

ExceptionId:main:1251446767295:aaf27a255c491475

Code:service.FAILURE

at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.java:251)

at com.zimbra.cs.zclient.ZMailbox.postRESTResource(ZMailbox.java:2624)

at com.zimbra.cs.zclient.ZMailboxUtil.doPostRestURL(ZMailboxUtil.java:2691)

at com.zimbra.cs.zclient.ZMailboxUtil.execute(ZMailboxUtil.java:1114)

at com.zimbra.cs.zclient.ZMailboxUtil.main(ZMailboxUtil.java:2574)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.zimbra.common.util.ConsoleRunner.main(ConsoleRunner.java:96)

[SOLVED] Backup / Restore with tgz formatter

Posted: Fri Aug 28, 2009 11:00 am
by Service
Nervermind, I managed to use imapsync finally.

[SOLVED] Backup / Restore with tgz formatter

Posted: Sun Feb 10, 2013 8:47 am
by mtanzer
Actually ist is NOT solved. This is a workaround.

[SOLVED] Backup / Restore with tgz formatter

Posted: Sun Feb 10, 2013 9:01 am
by phoenix
[quote user="mtanzer"]Actually ist is NOT solved.[/QUOTE]..... and the point of adding this to a thread that's almost four years old I what?
[quote user="mtanzer"]This is a workaround.[/QUOTE]A 'solution' in this case is what worked for the o/p, nobody said the original problem was solved.

[SOLVED] Backup / Restore with tgz formatter

Posted: Sun Jun 16, 2013 5:46 pm
by frss03
[quote user="10330phoenix"]..... and the point of adding this to a thread that's almost four years old I what?
A 'solution' in this case is what worked for the o/p, nobody said the original problem was solved.[/QUOTE]


I understand that it is a closed message, but it had not solution until this time.
I solved this issue replacing the & (ampersand symbol) with the equivalent to URLs: %26%.
When I tested the "&" in Zimbra 6 there was not problem, but when migrate to Zimbra 8 the problem appeared.
So in any message of this forum this solution doesnt appears and this is my contribution.
/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL “//?fmt=tgz%26%resolve=reset” /tmp/account.tgz

[SOLVED] Backup / Restore with tgz formatter

Posted: Fri Jun 28, 2013 9:33 am
by maschimidt
[quote user="frss03"]I understand that it is a closed message, but it had not solution until this time.
I solved this issue replacing the & (ampersand symbol) with the equivalent to URLs: %26%.
When I tested the "&" in Zimbra 6 there was not problem, but when migrate to Zimbra 8 the problem appeared.
So in any message of this forum this solution doesnt appears and this is my contribution.
/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL “//?fmt=tgz%26%resolve=reset” /tmp/account.tgz
[/QUOTE]
Hi in my case after replacing the & for %26% error changed


/opt/zimbra/bin/zmmailbox -z -m space@mydomain postRestURL "//?fmt=tgz%26%resolve=reset" /root/prg/space@mydomain

ERROR: service.FAILURE (system failure: POST failed, status=400 error parsing message)
Thanks for help..

[SOLVED] Backup / Restore with tgz formatter

Posted: Mon Jul 01, 2013 1:22 am
by 7531prashant
zmztozmig can also be used for zimbra to zimbra migration.
zimbra@zcs147:~$ /opt/zimbra/libexec/zmztozmig -h

usage:

*********************

zmztozmig -[options]

Options details:

-v --version Prints version

-h --help Shows help

-f --ConfigFile Config file path

[default file -> /opt/zimbra/conf/zmztozmig.conf ]

-d --debug prints versbose debug messages

Re: [SOLVED] Backup / Restore with tgz formatter

Posted: Fri Aug 10, 2018 7:12 pm
by hisfran
The correct syntax is at: https://wiki.zimbra.com/wiki/Ajcody-Mig ... fter_Dates
This worked for me to export from an old Zimra 7 server.

Code: Select all

 zmmailbox -z -m user@`zmhostname` gru '/?fmt=tgz&query=after:"10/01/14" and before:"10/15/14"' > /tmp/filename.tgz