After some more testing I found that the above does not quite work. What you need to do is the following:
- Create all your accounts with this: zxsuite backup doExternalRestore /path/for/the/data/ provisioning_only TRUE
- Then find all your Archive Account with: zmprov ga user@domain.com | grep ArchiveAccount:
- Then create your Archive Account with: zmarchiveconfig enable user@domain.com archive-address user-1234@domain.com.archive
Here is a script I wrote to do all of this. Remember, this server is blank, only the accounts and domains have been created:
AS ZIMBRA:
Code:
accounts=`zmprov -l gaa <domain>`
echo $accounts
for ac in $accounts; do
zmprov ga $ac | grep ArchiveAccount: | awk '{print "zmarchiveconfig enable " "'$ac'" " archive-address " $2}' | bash;
### To add archiving use:
### zmarchiveconfig enable <user>@<domain> archive-address <user>-<number>@<domain>.archive
### to delete archiving use:
### su - zimbra -c "zmprov ma <user> -zimbraArchiveAccount <user>-<number>@<domain>.archive"
done
Once you have created all your accounts and archive accounts you can start with your restore.
I had to do this, else Zimbra runs out of licenses with a normal restore.
kind regards
aubrey
Bookmarks