I try to write a simple backup script to be able to restore just the data of all folders of a user with rest urls.

The idea is to:
1. get all user
(This is simple zmprov -a gaa)

2. get the list of folders for each user
(This is where my problem starts! I know i can get the folders with "zmmailbox -z -m $account gaf" but this list is not really easy to work on later in the script. &recursive=1 is still not working on REST Urls as far as i know and even if it was working i dont think i could tell the REST Url to just export the local user folders and not the shared ones also?!?)

3. Create REST Urls for all folders and export each with wget as a zip

Is there a simple way to get a clean list of all folders of a user from a special type like message or appointment but just those which are not shared folders?!?

Because the last step would be to create rest urls with this folders and get a zip for every rest url. I could even create the folder structure on my backupdrive for each account (zimbrauser) and save this zipfiles there. In case that some messages appointments or whatever get lost for a single user it sould be very easy to restore those date.

I would not be perfect since tags and other meta data would be lost but for most of my recovery tasks it would be enough and i don't have to do a full restore of my full backup on another zimbra server just to get some lost data out without overwriting all days data since my last full backup on my live zimbra install.

Thanks for anything which points me in the right direction!