CLI zmrestore Network Edition only: Difference between revisions

mNo edit summary
(Updating content to ZCS 6.0)
Line 1: Line 1:
==<font size="4" color="#00007f" face="Arial"> ''' zmrestore  ''' </font>==
The CLI command zmrestore is available only on ZCS Network Edition. For the most recent information on this CLI, including syntax and description, see [http://www.zimbra.com/docs/ne/latest/administration_guide/A_app-command-line.20.1.html ZCS Administrator's Guide Network Edition, Appendix A Command-Line Utilities].


(Network Edition only)
=ZCS 6.0.x=
==zmrestore==
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. In addition, you can restore to a specific point in time.


<font size="3" color="#000000" face="Arial">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.</font>
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, '''-rf''' is the same as '''--restorefullBackupOnly'''.


<font size="3" color="#000000" face="Arial"> 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, <font size="3" color="#000000" face=""Times New Roman"">'''-rb'''</font> is the same as --<font size="3" color="#000000" face=""Times New Roman"">'''restorefullBackupOnly'''</font>.</font>
===Syntax===
zmrestore [options]


<font size="3" color="#00007f" face="Arial"> ''' Syntax ''' </font>
====Description====
 
{|style="width:100%" border="1" cellpadding="5" cellspacing="0"
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''zmrestore {-f | -i} -a (account) <options>''' </font> </font>
! align="left" bgcolor="tan" |Long Name
 
! align="left" bgcolor="tan" |Short Name
<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
! align="left" bgcolor="tan"|Description
 
|-
<font size="3" color="#000000" face="Arial"> </font>
|style="background=white" |<nowiki>--account</nowiki>
 
|<nowiki>-a</nowiki>
<div></div><div>
|'''<arg>''' Specifies the account email addresses. Separate accounts with a blank space or type '''all''' to restore all accounts.
 
{| border="1" cellpadding="8"
|+
|-
|-
| valign="middle" |
|<nowiki>--backedupRedologs Only</nowiki>
<font size="3" color="#00007f" face="Arial"> ''' Long Name ''' </font>
|<nowiki>-br</nowiki>
| valign="middle" |
|Replays the redo logs in backup only, which excludes archived and current redo logs of the system
<font size="3" color="#00007f" face="Arial"> ''' Short Name''' </font>
| valign="middle" |
<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
|-
|-
| valign="top" |
|<nowiki>--continueOnError</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''--label <arg>''' </font>  </font>
|<nowiki>-c</nowiki>
| valign="top" |
|Continue to restore other accounts when an error occurs
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-lb''' </font>  </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> The label of the full backup to restore. Restores to the latest full backup if this is omitted.</font>
|-
|-
| valign="top" |
|<nowiki>--createAccount</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''--restorefullBackup ''' </font>  <font size="3" color="#000000" face=""Times New Roman""> '''Only''' </font> </font>
|<nowiki>-ca</nowiki>
| valign="top" |
|Restores accounts to target accounts whose names are prepended with prefix. (Can only be used in commands that use the '''<nowiki>-pre</nowiki>''' option.)
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-rf''' </font>  </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Restores to the full backup only, not any incremental backups since that backup.</font>
|-
|-
| valign="top" |
|<nowiki>--debug</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''--restoreAccount''' </font>  </font>
|<nowiki>-d</nowiki>
| valign="top" |
|Display diagnostics for debugging purposes
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-ra''' </font>  </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Restores the account in directory service.</font>
|-
|-
| valign="top" |
|<nowiki>--help</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''--restoreToIncrLabel <arg>''' </font>  </font>
|<nowiki>-h</nowiki>
| valign="top" |
|Displays the usage options for this command
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> ''' ''' </font>  </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Replay redo logs up to and including this incremental backup.</font>
|-
|-
| valign="top" |
|<nowiki>--ignoreRedoErrors</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''--restoreToRedoSeq <arg>''' </font>  </font>
|<nowiki></nowiki>
| valign="top" |
|If true, ignore all errors during redo log replay
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> ''' ''' </font>  </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Replay up to and including this redo log sequence.</font>
|-
|-
| valign="top" |
|<nowiki>--label</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-restoreToTime <arg>'''</font> </font>
|<nowiki>-lb</nowiki>
| valign="top" |
|'''<arg>''' The label of the full backup to restore. Restores to the latest full backup if this is omitted.
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> ''' ''' </font>  </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> [[CLI_zmrestore_restoreToTime_Network_Edition_only | Replay up to and including this redo log sequence of said time.]]</font>
|-
|-
| valign="top" |
|<nowiki>--prefix</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --prefix ''' </font>
|<nowiki>-pre</nowiki>
| valign="top" |
|'''<arg>''' The prefix to pre-pend to the original account names
<font size="3" color="#000000" face=""Times New Roman""> ''' -pre ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial">  <font size="3" face=""Times New Roman""><prefix> </font> The prefix to pre-pend to the original account names. </font>
|-
|-
| valign="top" |
|<nowiki>--restoreAccount</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --systemData ''' </font>
|<nowiki>-ra</nowiki>
| valign="top" |
|Restores the account in directory service
<font size="3" color="#000000" face=""Times New Roman""> ''' -sys ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Restores global tables and local config.</font>
|-
|-
| valign="top" |
|<nowiki>-restoreToIncrLabel</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --createAccount ''' </font>
|<nowiki></nowiki>
| valign="top" |
|'''<arg>'''Replay redo logs up to and including this incremental backup
<font size="3" color="#000000" face=""Times New Roman""> ''' -ca ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Restores accounts to new target accounts whose names are pre-pended with <prefix>.</font>
|-
|-
| valign="top" |
|<nowiki>-restoreToRedoSeq</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --backedupRedolog Only''' </font>
|<nowiki></nowiki>
| valign="top" |
|'''<arg>''' Replay up to and including this redo log sequence
<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" |
|<nowiki>-restoreToTime</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --continueOnError ''' </font>
|<nowiki></nowiki>
| valign="top" |
|'''<arg>''' Replay rodo logs until this time
<font size="3" color="#000000" face=""Times New Roman""> ''' -c ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Continue to restore other accounts when an error occurs.</font>
|-
|-
| valign="top" |
|<nowiki>--restorefullBackup Only</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --account ''' </font>
|<nowiki>-rf</nowiki>
| valign="top" |
|Restores to the full backup only, not any incremental backups since that backup.
<font size="3" color="#000000" face=""Times New Roman""> ''' -a ''' </font>
| 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>
|-
|-
| colspan="3" valign="top" |
|<nowiki>--server</nowiki>
<font size="3" color="#000000" face="Arial"> ''' Common Options ''' </font> <font size="3" color="#000000" face="Arial"></font>
|<nowiki>-s</nowiki>
|'''<arg>''' Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name.
|-
|-
| valign="top" |
|<nowiki>--skipDeletes</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''--server''' </font>  </font>
|<nowiki></nowiki>
| valign="top" |
|If true, do not execute delete operation during redo log replay
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-s''' </font> </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name.</font>
|-
|-
| valign="top" |
|<nowiki>--skipDeletedAccounts</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-skipDeletedAccounts''' </font>  </font>
|<nowiki></nowiki>
| valign="top" |
|Do not restore if named accounts were deleted or did not exist at backup time. (This option is always enabled with '''<nowiki>-a all</nowiki>''')
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-skipDeletedAccounts''' </font> </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Do not restore if named accounts were deleted or did not exist at backup time. (This option is always enabled with "-a all"). </font>
|-
|-
| valign="top" |
|<nowiki>--systemData</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''--target''' </font>  </font>
|<nowiki>-sys</nowiki>
| valign="top" |
|Restores global tables and local config
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-t''' </font>  </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Specifies the backup target location. The default is <zimbra_home>/backup. </font>
|-
|-
| valign="top" |
|<nowiki>--target</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''--help''' </font>  </font>
|<nowiki>-t</nowiki>
| valign="top" |
|'''<arg>''' Specifies the backup target location. The default is <zimbra_home>/backup.  
<font size="3" color="#000000" face=""Times New Roman""> <font size="3" color="#000000" face=""Times New Roman""> '''-h''' </font> </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Displays the usage options for this command.</font>
|}
|}


</div>
====Examples====
*Perform complete restore of all accounts on '''server1''', including last full backup and any incremental backups since last full backup.


<font size="3" color="#00007f" face="Arial"> ''' Examples ''' </font>
zmrestore -a all -s server1.domain.com


{|
*Perform restore only to last full backup, excluding incremental backups since then, for all accounts on '''server1'''.
|- valign="baseline"
| width="19.2" |
<div> <font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font> </div>
| <font size="3" color="#000000" face="Arial"> Perform complete restore of all accounts on '''server1''', including last full backup and any incremental backups since last full backup.</font>
|}


<blockquote>
zmrestore -rf -a all -s server1.domain.com


<font size="2" color="#000000" face=""Courier New"">'''<font face="Times New Roman, Times, serif">zmrestore </font>''' <font face="Times New Roman, Times, serif">'''<font size="3" color="#000000">-a all </font>-s server1.domain.com'''</font></font>
*Create a new account from a backup of the target account. The name of the new account will be new_user1@domain.com.
 
</blockquote>
 
{|
|- valign="baseline"
| width="19.2" |
<div> <font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font> </div>
| <font size="3" color="#000000" face="Arial"> Perform restore only to last full backup, excluding incremental backups since then, for all accounts on '''server1'''.</font>
|}


<blockquote>
zmrestore -a user1@domain.com -ca -pre new_


<font size="2" color="#000000" face=""Courier New""> <font face="Times New Roman, Times, serif">'''zmbackup -rf '''</font> '''<font size="3" color="#000000" face="Times New Roman, Times, serif">-a all </font><font face="Times New Roman, Times, serif">-s server1.domain.com</font>'''</font>


</blockquote>
{{Article Footer|Zimbra Collaboration Suite 6.0.x|}}


[[Category:Command Line Interface]]
[[Category:Command Line Interface]]
[[Category:ZCS 6.0]]

Revision as of 19:51, 7 December 2009

The CLI command zmrestore is available only on ZCS Network Edition. For the most recent information on this CLI, including syntax and description, see ZCS Administrator's Guide Network Edition, Appendix A Command-Line Utilities.

ZCS 6.0.x

zmrestore

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. In addition, you can restore to a specific point in time.

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, -rf is the same as --restorefullBackupOnly.

Syntax

zmrestore [options]

Description

Long Name Short Name Description
--account -a <arg> Specifies the account email addresses. Separate accounts with a blank space or type all to restore all accounts.
--backedupRedologs 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
--createAccount -ca Restores accounts to target accounts whose names are prepended with prefix. (Can only be used in commands that use the -pre option.)
--debug -d Display diagnostics for debugging purposes
--help -h Displays the usage options for this command
--ignoreRedoErrors If true, ignore all errors during redo log replay
--label -lb <arg> The label of the full backup to restore. Restores to the latest full backup if this is omitted.
--prefix -pre <arg> The prefix to pre-pend to the original account names
--restoreAccount -ra Restores the account in directory service
-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 rodo logs until this time
--restorefullBackup Only -rf Restores to the full backup only, not any incremental backups since that backup.
--server -s <arg> Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name.
--skipDeletes If true, do not execute delete operation during redo log replay
--skipDeletedAccounts Do not restore if named accounts were deleted or did not exist at backup time. (This option is always enabled with -a all)
--systemData -sys Restores global tables and local config
--target -t <arg> Specifies the backup target location. The default is <zimbra_home>/backup.

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.
zmrestore -rf -a all -s server1.domain.com
  • Create a new account from a backup of the target account. The name of the new account will be new_user1@domain.com.
zmrestore -a user1@domain.com -ca -pre new_


Verified Against: Zimbra Collaboration Suite 6.0.x Date Created:
Article ID: https://wiki.zimbra.com/index.php?title=CLI_zmrestore_Network_Edition_only Date Modified: 2009-12-07



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search