Notifications
Clear all

Zimbra Disaster Recovery with Zextras Suite | Zimbra

3 Posts
3 Users
2 Likes
697 Views
(@michele)
Joined: 3 years ago
Posts: 85
Topic starter  

Step by step guide to Zimbra Disaster Recovery using Zimbra suite. How to manage a disaster recovery in Zimbra In a previous article, we’ve seen some disaster scenarios that can occur and some traditional disaster recovery solutions, as well as an overview of Zextras solution. With the following article, however, we want to go over…

This topic was modified 3 years ago by Michele Ferron
This topic was modified 3 years ago 15 times by Irene Carbone
This topic was modified 3 years ago by
This topic was modified 2 years ago 2 times by Arman Khosravi
This topic was modified 2 years ago by Irene Carbone

   
Quote
Jim Dunphy
(@jdunphy)
Joined: 6 years ago
Posts: 25
 

A few question on this as I am practicing various recovery strategies so very new to using your backup/restore tool using this external restoration method.

I noticed that after provisioning the accounts (provisioning_only TRUE) and then provisioning the external backup for multiple accounts (concurrent_accounts 5) that data didn't seem to arrive from latest to oldest for my empty account. Is there a way to modify that behavior? I was testing my account which has data from 2005 so there was a lot of email in the process of being restored and the entire process was fairly long to finish. Ideally, the only data I required immediately was my recent data and not those older messages from 2005 so was wondering if there was a best practice or switch to change the priority of what is restored?

The other question is about unattended restoration.  I have the OS and default zimbra system installed and configured with no interactive keystrokes from a script but each zxsuite command looks like it will require that I either parse the log given in the output of executing the zxsuite command or loop on the monitor command until it exits. Is there a best practice or trick that you guys use to know when your zxsuite commands are finished before issuing the next command in the restore sequence?

It appears there are a number of steps or sequence for commands that need to be executed for the full restore from the various documentation I have found on this and I was hoping to find an unattended method that I could program into my script. For example it might be nice if there was a FIFO or unix domain socket, etc  I could have my script block on with a read for some sort of finished notification message, etc which you could do with a single write message to that FIFO or unix domain socket .... then the script would continue to do the next command in sequence. Just an idea off the top of my head if there was no method available other than parse the log file.

So I am looking for something like this logic for my script:

zxsuite backup ...

read FIFO and wait/block

unblock when zxsuite above my read completes, check for errors and if none continue processing

zxsuite backup ... next command, etc... repeat.

...

...

until the site is completely restored unattended. 

Do you have any recommendations that I could use to know when a zxsuite command had finished to build my unattended restore script?

Finally, the last question... Is there a way to add files or directories we want to see backed up to that list of files you are saving with the customizations tar image? For example, /opt/zimbra/.acme.sh/

Thanks

Jim


   
ReplyQuote
Matt
 Matt
(@matt)
Joined: 5 years ago
Posts: 41
 

Hello Jim,
I'll try to reply to your questions:

>was wondering if there was a best practice or switch to change the priority of what is restored?

The restoration order depends by the zimbraId of the accounts to be restored.

To achieve your goal, I would suggest using lists of email addresses, one per line, divided by priority.
You can prepare some files and then process them sequentially.
For example, `/folder/high_priority.txt` and `/folder/medium_priority.txt`.
Then you can simply run:

* `zxsuite backup doExternalRestore /path/to/restore/folder input_file /folder/high_priority.txt`
* `zxsuite backup doExternalRestore /path/to/restore/folder input_file /folder/medium_priority.txt`
* `zxsuite backup doExternalRestore /path/to/restore/folder`

The last command will restore all the remaining accounts, skipping the ones already imported.

>Is there a best practice or trick that you guys use to know when your zxsuite commands are finished before issuing the next command in the restore sequence?

ZxSuite commands are asynchronous, this means that when you run the command it will be immediately terminated and the operation will continue running in the background.

To force the command waiting the end of the operation, you can use the `--sync` parameter as the following example:

`zxsuite --sync backup doExternalRestore ...`

This will make the command wait for the operation to terminate and will return an exit code (Successful, Failed, Stopped, Removed, Interrupted).
Another useful parameter for the `zxsuite` command is `--json`, which will return the output in JSON format, this could be useful in your scripts.

>Is there a way to add files or directories we want to see backed up to that list of files you are saving with the customizations tar image?

Could you please give me more details on this? If the software doesn't already backup your customizations to Zimbra, maybe I can open an RFE to the Product Owners, but I'll need more details on the case use and the kind of data you're going to add.

Hope this helps.
Thanks in advance.


   
ReplyQuote