ZxBackup: Multistore Informations

From ZeXtras Suite Wiki

Jump to: navigation, search
Language: English  • español • português
ZxBackup logo box.png
Available since version: 0.87
Latest Version: 2.10.2
Released on: November 26th, 2018
Compatibility List
Admin Guide
FAQ
Troubleshooting
Backup Initialization
ZspBackup logo box.png

ZeXtras Backup and Multistores

Version 1.0.0 of ZeXtras Suite introduced the long-awaited Multistore support. This means that now the ZeXtras Backup module can be used on Zimbra environments consisting of multiple mailbox servers.

This short paper explains how to use ZeXtras Backup on a multistore environment.

ZxBackup in a Multistore Environment

Command execution in a Multistore Environment

The new ZeXtras Suite Administration Zimlet makes the management of multiple servers very easy. You can select a server from the ZxBackup tab and perform all backup operations on that server, even if you are logged into the Zimbra Administration Console of another server. See the standard Zx Backup Admin Guide to learn how to perform basic backup operations.

This also applies to the ZeXtras CLI. Operations can be launched on any server using the --host [hostname|ip] option.

Specific differences between Singlestore and Multistore environments are:

  • In a Multistore Environment, Restore on New Account operations ALWAYS create the new account in the Source account's mailbox server.
  • All operations are logged on the target server, not in the server that launched the operation.
  • If a wrong target server for an operation is chosen, Zimbra automatically proxies the operation request to the right server.

Backup and Restore

Backup and Restore in a Multistore environment will work exactly like in a Singlestore environment.

The different servers will be configured and managed separately via the ZeXtras Adminsitration Zimlet, but certain operations like Live Full Scan and Stop All Operations can be 'broadcast' to all the mailstores via the zxsuite CLI using the --hostname all_servers option. This applies also to ZeXtras Backup settings (see the ZeXtras CLI wiki page for more details).

Backup and Restore operations are managed as follows:

  • Live full scans can be executed on single servers via the ZeXtras Administration Zimlet or on multiple servers via the Zextras CLI.
  • Restores can be started from the "Accounts" tab in the Zimbra Admin Console, from each server tab in the ZeXtras Backup menu of the Zextras Administration Zimlet and via the ZeXtras CLI. The differences between these methods are:
Operation started from: Options
"Accounts tab" The selected account's restore is automatically started in the proper server.
"Server tab" Any accounts eligible for a restore on the selected server can be chosen as the restore 'source'
"ZeXtras CLI" Any account on any server can restored, but there is no automatic server selection.

Export and Import

Export and Import functions are those which differ the most when performed on a Multistore environment.

Here are the basic scenarios:

Export from a Singlestore and import to a Multistore

Importing multiple accounts of a single domain to different store will break the consistency of ALL the items that are shared from/to a mailbox on a different server.

Starting with ZeXtras Suite 1.0.0-RC3 a new command in the ZeXtras CLI has been added in order to fix the shares for accounts of the same domain imported in differen servers.

Export from a Multistore and import to a Single or Multistore

Two different Scenarios apply here:

  • "Mirror" import: Same number of source and destination mailstores, each export is imported on a different server. This will break the consistency of ALL the items that are shared from/to a mailbox on a different server. The `doCheckShares` and `doFixShares` CLI commands are available to check and fix share consistency (see below).
  • "Composite" import: Same or different number of source and destination servers. Domains or accounts are manually imported into different servers. This will break the consistency of ALL the items that are shared from/to a mailbox on a different server. The `doCheckShares` and `doFixShares` CLI commands are available to check and fix share consistency (see below)

The `doCheckShares` and `doFixShares` commands

The `doCheckShares` command will parse all share informations in local accounts and report any error:

zimbra@test:~$ zxsuite help backup doCheckShares

Syntax:
   zxsuite backup doCheckShares 


Usage example:

zxsuite backup doCheckShares
Check all shares on local accounts

The `doFixShares` will fix all share inconsistencies using a migration mapfile as the reference. Mapfiles can be found in the Backup Path of the destination server (default: /opt/zimbra/backup/zextras) and are named "map_{source_server_ID}".

zimbra@test:~$ zxsuite help backup doFixShares

Syntax:
   zxsuite backup doFixShares {import_idmap_file} 


PARAMETER LIST

NAME                    TYPE      
import_idmap_file(M)    String    

(M) == mandatory parameter, (O) == optional parameter

Usage example:

zxsuite backup doFixShares idmap_file
Fixes the shares' consistency after an import according to the mapping contained in the /opt/zimbra/backup/zextras/idmap_file	
Personal tools