Thank you for confirmation, bdial!
----------
SOLUTION
----------
This is only an issue if two different zimbraIds (Account IDs/UUIDs) have been associated with the
same e-mail name on a mailstore. In our case, this was caused by an e-mail name being deprovisioned then, in the luck of the draw, ended up being reprovisioned on the same mailstore.
1. Identify the new zimbraId, the old zimbraId and the last full backup label for the old zimbraId.
If you run a zmbackupquery in the timeframe
before the e-mail name was deprovisioned, you will get this information in the results. You man have to try a couple times to make sure your "from" argument is early enough to get a full label.
example - account removed 19 March 2010:
This will yield a list of full and incr(emental) labels:
Quote:
Account: name1@example.org
Label: incr-20100318.050602.864
Type: incremental
Started: Thu, 2010/03/18 01:06:02.864 EDT
Ended: Thu, 2010/03/18 01:59:06.209 EDT
Acct ID: e3204d2f-7451-...snip...
Label: incr-20100317.050630.370
Type: incremental
Started: Wed, 2010/03/17 01:06:30.370 EDT
Ended: Wed, 2010/03/17 01:58:09.250 EDT
Acct ID: e3204d2f-7451-...snip...
Label: full-20100315.050026.256
Type: full
Started: Mon, 2010/03/15 01:00:26.256 EDT
Ended: Tue, 2010/03/16 05:11:01.748 EDT
Acct ID: e3204d2f-7451-...snip...
|
2. Note current accounts.xml contents
PATH: $HOME/backup/accounts.xml
Result (example):
Quote:
|
<account zimbraId="e36217fd-732c-...snip..." email="name1@example.org" latestFullBackupLabel="full-20100323.123530.007">
|
This reveals the new zimbraId and current full backup label.
Copy accounts.xml with a fitting label. (Best Practice move!)
example:
Quote:
|
$ cp accounts.xml accounts.xml.VB20100326_oldID
|
3. Modify accounts.xml
Using your preferred text editor, change the "zimbraId" to the old ID and the "latestFullBackupLabel" to the older full label you collected earlier.
(You might even want to copy this version of accounts.xml to an approriately labelled copy just in case.)
4. Run your restoration
You have to use specific full and incr(emental) arguments for zmrestore to work well with this scenario. You must use the labels that you have collected above. (You cannot do, for instance, a "-restoreToTime" argument.)
example:
Quote:
|
zmrestore -ca -a name1@example.com -pre restore_ -lb full-20100315.050026.256 -restoreToIncrLabel incr-20100318.050602.864
|
(Notice the "-pre" argument with a label that will be added to the begining of the e-mail name, resulting in an account named "restore_name1@example.com" You can make "restore_" any text you'd like - this is a standard I have produced for myself.)
I use this procedure and then imapsync the retrieved content into a Restore folder in the user's current account. This is sort of a fail-safe I've built for myself.
5. Make sure to return the accounts.xml file back to normal/current settings
Quote:
|
$ cp accounts.xml.VB20100326_oldID accounts.xml
|