> > For example a quick&dirty way to replicate individual backups and
> > restores:
> >
> > zmprov getallaccounts > myaccounts.txt
> > for i in `cat myaccounts.txt` ;
> >  do echo "sm $i" >> backmeup.zm ;
> >  echo "getRestURL \“//?fmt=tgz\” > /backups/$i.tgz" >> backmeup.zm ;
> >  zmprov getAccount $i > /backups/$i.settings ;
> > done
> > zmmailbox -z -f backmeup.zm > logfile.log 2>&1
> >
> > Restore:
> > zmmailbox -z -m user@domain postRestURL “//?fmt=tgz&resolve=reset”
> > /backups/account.tgz
> >
>

> Cool! Is this sort of backup implicitly full/0-level? Is there a way
> to do incremental archives?
> 

Yep that's the full backup of the account. To do incremental archives you can 
add a query to the getRestURL.  So that line would read:

echo "getRestURL \"//?fmt=tgz&query=after:$LASTBACKUP\" ....

$LASTBACKUP being a date variable that you set in the script.

The query parameter allows for any query that the webclient accepts.  So you 
can download individual folders, only items with attachments etc.  Even 
selecting a folder in the UI is really just a search i.e. in:"inbox/LOPSA" .

For the curious they (finally) documented the Rest API: 
http://wiki.zimbra.com/wiki/ZCS_6.0:Zimbra_REST_API_Reference .  It allows for 
funky things like viewing your inbox as a rss feed.


Damion

_______________________________________________
Tech mailing list
Tech@lists.lopsa.org
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to