CLI zmrestore Network Edition only: Difference between revisions

mNo edit summary
m (ordering)
Line 80: Line 80:
|-
|-
| valign="top" |
| valign="top" |
<font size="3" color="#000000" face=""Times New Roman""> ''' --systemData ''' </font>
<font size="3" color="#000000" face=""Times New Roman""> ''' --createAccount ''' </font>
| valign="top" |
| valign="top" |
<font size="3" color="#000000" face=""Times New Roman""> ''' -sys ''' </font>
<font size="3" color="#000000" face=""Times New Roman""> ''' -ca ''' </font>
| valign="top" |
| valign="top" |
<font size="3" color="#000000" face="Arial"> Restores global tables and local config.</font>
<font size="3" color="#000000" face="Arial"> Restores accounts to new target accounts whose names are pre-pended with <prefix>.</font>
|-
|-
| valign="top" |
| valign="top" |
<font size="3" color="#000000" face=""Times New Roman""> ''' --createAccount ''' </font>
<font size="3" color="#000000" face=""Times New Roman""> ''' --systemData ''' </font>
| valign="top" |
| valign="top" |
<font size="3" color="#000000" face=""Times New Roman""> ''' -ca ''' </font>
<font size="3" color="#000000" face=""Times New Roman""> ''' -sys ''' </font>
| valign="top" |
| valign="top" |
<font size="3" color="#000000" face="Arial"> Restores accounts to new target accounts whose names are pre-pended with <prefix>.</font>
<font size="3" color="#000000" face="Arial"> Restores global tables and local config.</font>
|-
|-
| valign="top" |
| valign="top" |
Line 178: Line 178:
----
----
----
----
Important: After you perform any of the following point-in-time restores, you should immediately run a complete backup for those accounts to avoid future restore problems with those accounts.
A restore done using any of the following options is a point-in-time restore:
A restore done using any of the following options is a point-in-time restore:



Revision as of 20:00, 14 January 2008

zmrestore

(Network Edition only)

This tool performs full restores and incremental restores for a designated mail host. You can either specify specific accounts, or, if no accounts are specified, all accounts are in the backup are restored.

This utility has short option names and full names. The short option is preceded by a single dash, the full option is proceeded by a double dash. For example, -rb is the same as --restorefullBackupOnly.

Syntax

zmrestore {-f | -i} -a (account) <options>

Description

Long Name

Short Name

Description

--label <arg>

-lb

The label of the full backup to restore. Restores to the latest full backup if this is omitted.

--restorefullBackup Only

-rf

Restores to the full backup only, not any incremental backups since that backup.

--restoreAccount

-ra

Restores the account in directory service.

After performing any of the following point-in-time restores, you should run a complete backup for those accounts to avoid future restore problems with those accounts.

--restoreToIncrLabel <arg>

Replay redo logs up to and including this incremental backup.

--restoreToRedoSeq <arg>

Replay up to and including this redo log sequence.

-restoreToTime <arg>

Replay redo log sequence until time specified. Please use -lb to specify a full backup that took place prior to the time you wish to restore to.

--prefix

-pre

<prefix> The prefix to pre-pend to the original account names.

--createAccount

-ca

Restores accounts to new target accounts whose names are pre-pended with <prefix>.

--systemData

-sys

Restores global tables and local config.

--backedupRedolog Only

-br

Replays the redo logs in backup only, which excludes archived and current redo logs of the system.

--continueOnError

-c

Continue to restore other accounts when an error occurs.

--account

-a

Specifies the account email addresses. Separate accounts with a blank space or type all to restore all accounts.

Common Options

--server

-s

Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name.

-skipDeletedAccounts

-skipDeletedAccounts

Do not restore if named accounts were deleted or did not exist at backup time. (This option is always enabled with "-a all").

--target

-t

Specifies the backup target location. The default is <zimbra_home>/backup.

--help

-h

Displays the usage options for this command.

Examples

Perform complete restore of all accounts on server1, including last full backup and any incremental backups since last full backup.

zmrestore -a all -s server1.domain.com

Perform restore only to last full backup, excluding incremental backups since then, for all accounts on server1.

zmbackup -rf -a all -s server1.domain.com



A restore done using any of the following options is a point-in-time restore:

-restoreToTime <arg>- Replay the redo logs until the time specified.

-restoreToIncrLabel <arg> - Replay redo logs up to and including this incremental backup.

-restoreToRedoSeq <arg> - Replay up to and including this redo log sequence.

-br - Replays the redo logs in backup only, therefore excluding archived and current redo logs of the system.

-rf - Restores to the full backup only. This does not include any incremental backups at all.

You can specify an exact time, the incremental backup label, or the redo log sequence to restore to. Restore stops at the earliest possible point in time if more than one point in time restore options are specified. zmrestore -a account@company.com-restoreToTime <arg>

Two common ways to write the <arg> are:

YYYY/MM/DD hh:mm:ss

YYYYMMDD.hhmmss

Specify date/time in one of these formats:

2006/08/02 16:55:05 268 2006/08/02 16:55:05 20060802.165505.268 20060802.165505 20060802165505268 20060802165505

Perform an incremental restore only to last full backup, excluding incremental backups since then, for all accounts

zmrestore -rf --a all

Note: A good way to test what your restore is going to look like is to restore to a new target account where a prefix is prepended to the original account names:

zmrestore -ca -a account@company.com -pre restored_

The result from the above example would be an account called restored_account@company.com.



Other:

Restore mailbox and LDAP data for an account

zmrestore -ra -a account@company.com


Restore system tables in the database (db) and the local config

zmrestore -sys

Include --contineOnError (-c) to the command so that the restore process continues if an error is encountered.

zmrestore -a all -c

When -c is designated, accounts that could not be restored are displayed when the restore process is complete

To restore a specific account. Can also be used to restore deleted accounts

zmrestore -a account@company.com

To avoid restoring accounts that were deleted

zmrestore -a account@company.com -skipDeletedAccounts
Jump to: navigation, search