CLI zmrestore Network Edition only: Difference between revisions

m (ordering)
mNo edit summary
Line 71: Line 71:
| valign="top" |
| valign="top" |
<font size="3" color="#000000" face="Arial"> 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.'''</font>
<font size="3" color="#000000" face="Arial"> 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.'''</font>
|-
| valign="top" |
<font size="3" color="#000000" face=""Times New Roman""> ''' --backedupRedolog Only''' </font>
| valign="top" |
<font size="3" color="#000000" face=""Times New Roman""> ''' -br ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Replays the redo logs in backup only, which excludes archived and current redo logs of the system.</font>
|-
| colspan="3" valign="top" |
<font size="3" color="#000000" face="Arial">Restoring to a test location first is a good idea to show you what the restore is going to look like:</font> <font size="3" color="#000000" face="Arial"></font>
|-
|-
| valign="top" |
| valign="top" |
Line 85: Line 95:
| 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 accounts to new target accounts whose names are pre-pended with <prefix>.</font>
|-
| colspan="3" valign="top" |
<font size="3" color="#000000" face="Arial"> ''' Common Options ''' </font> <font size="3" color="#000000" face="Arial"></font>
|-
|-
| valign="top" |
| valign="top" |
Line 92: Line 105:
| 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 global tables and local config.</font>
|-
| valign="top" |
<font size="3" color="#000000" face=""Times New Roman""> ''' --backedupRedolog Only''' </font>
| valign="top" |
<font size="3" color="#000000" face=""Times New Roman""> ''' -br ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Replays the redo logs in backup only, which excludes archived and current redo logs of the system.</font>
|-
|-
| valign="top" |
| valign="top" |
Line 113: Line 119:
| valign="top" |
| valign="top" |
<font size="3" color="#000000" face="Arial"> Specifies the account email addresses. Separate accounts with a blank space or type <font size="3" color="#000000" face=""Times New Roman"">'''all'''</font> to restore all accounts.</font>
<font size="3" color="#000000" face="Arial"> Specifies the account email addresses. Separate accounts with a blank space or type <font size="3" color="#000000" face=""Times New Roman"">'''all'''</font> to restore all accounts.</font>
|-
| colspan="3" valign="top" |
<font size="3" color="#000000" face="Arial"> ''' Common Options ''' </font> <font size="3" color="#000000" face="Arial"></font>
|-
|-
| valign="top" |
| valign="top" |
Line 177: Line 180:


----
----
A few examples are below but more can be found at http://wiki.zimbra.com/index.php?title=Network_Edition_Restore
----
----
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.
-br - Replays the redo logs in backup only, therefore excluding archived and current redo logs of the system.



Revision as of 21:27, 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.

--backedupRedolog Only

-br

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

Restoring to a test location first is a good idea to show you what the restore is going to look like:

--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>.

Common Options

--systemData

-sys

Restores global tables and local config.

--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.

--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 few examples are below but more can be found at http://wiki.zimbra.com/index.php?title=Network_Edition_Restore


-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