Difference between revisions of "CLI zmschedulebackup Network Edition only"

(Adding Further Reading section, and link to Zimbra backup/restore post)
(zmschedulebackup: Updating content, not complete)
Line 1: Line 1:
==<font size="4" color="#00007f" face="Arial"> ''' zmschedulebackup  ''' </font>==
+
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=
 +
*zmschedulebackup now supports -u for uncompressed zip blob storage.
  
<font size="3" color="#000000" face="Arial">This command is used to schedule backups and add the command to your cron table.</font>
+
==zmschedulebackup==
 +
This command is used to schedule backups and add the command to your cron table.
 +
The default schedule is as follows:
  
<font size="3" color="#000000" face="Arial"> The default schedule is as follows: </font>
+
*Full backup, every Saturday at 1:00 a.m. (0 1 * * 6)
 +
*Incremental backup, Sunday through Friday at 1:00 a.m. (0 1 * * 0-5)
  
{|
+
Each crontab entry is a single line composed of five fields separated by a blank space. Specify the fields as follows:
|- valign="baseline"
 
| width="19.2" |
 
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
 
| <font size="3" color="#000000" face="Arial"> Full backup, every Sunday at 1:00 a.m. (0 1 * * 0) </font>
 
|}
 
  
{|
+
*minute — 0 through 59
|- valign="baseline"
+
*hour — 0 through 23
| width="19.2" |
+
*day of month — 1 through 31
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
+
*month — 1 through 12
| <font size="3" color="#000000" face="Arial"> Incremental backup, Monday through Saturday at 1:00 a.m. (0 1 * * 1-6) </font>
+
*day of week — 0 through 7 (0 or 7 is Sunday, or use names)
|}
 
  
<font size="3" color="#000000" face="Arial">Each crontab entry is a single line composed of five fields separated by a blank space. Specify the fields as follows: </font>
+
Type an asterisk (*) in the fields you are not using.
  
<font size="3" color="#000000" face="Arial"> minute  0 through 59</font>
+
This command automatically writes the schedule to the crontab.
  
<font size="3" color="#000000" face="Arial"> hour 0 through 23</font>
+
===Syntax===
 +
<nowiki>zmschedulebackup {-q|-s|-A|-R|-F|-D}[f|i|d|] [“schedule”]</nowiki>
  
<font size="3" color="#000000" face="Arial"> day of month  1 through 31</font>
+
===Description===
  
<font size="3" color="#000000" face="Arial"> month  1 through 12</font>
+
===Examples===
 +
*To schedule the default full and incremental backup
  
<font size="3" color="#000000" face="Arial"> day of week 0 through 7 (0 or 7 is Sunday)</font>
+
  zmschedulebackup -D
  
<font size="3" color="#000000" face="Arial"> Type an asterisk (*) in the fields you are not using.  </font>
+
*To replace the existing schedule with a new schedule
  
<font size="3" color="#000000" face="Arial"> This command automatically writes the schedule to the crontab. </font>
+
zmschedulebackup -R f [“schedule”]
  
<font size="3" color="#00007f" face="Arial"> ''' Syntax ''' </font>
+
*To add an additional full backup to the existing schedule
  
<font size="3" color="#000000" face=""Times New Roman""> ''' zmschedulebackup [-q]|-s|-A|-R|-F|-D] [schedule] [schedule...]  ''' </font>
+
  zmschedulebackup -A f [“schedule”]
  
<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
+
*To add an additional incremental backup to the existing schedule
  
{| border="2" cellpadding="8"
+
  zmschedulebackup -A i [“schedule”]
|+
 
|-
 
| valign="middle" |
 
<font size="3" color="#00007f" face="Arial"> ''' Name ''' </font>
 
| valign="middle" |
 
<font size="3" color="#00007f" face="Arial"> ''' Command Name''' </font>
 
| valign="middle" |
 
<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman""><div> </div></font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  i:  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Incremental backup. </font>
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman""><div> </div></font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  f:  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> full backup. </font>
 
|-
 
| colspan="2" valign="top" |
 
<font size="3" color="#000000" face="Arial"> ''' Common Options ''' </font>
 
| valign="top" |
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  Query  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  -q  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Default command, displays the existing Zimbra backup schedule.</font>
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  Save  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  -s  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Save the schedule. Allows you to save the schedule command to a text file so that you can quickly regenerate the backup schedule when the system is restored.</font>
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  Flush  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  -F  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Removes the current schedule and cancels all scheduled backups.</font>
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  Append  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  -A  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Adds an additional specified backup to the current schedule.</font>
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  Replace  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman"">  -R  </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Replaces the current schedule with the specified schedule.</font>
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman""> Default </font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman""> -D </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Replaces the current schedule with the default schedule.</font>
 
|-
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman""> Help </font>
 
| valign="top" |
 
<font size="3" color="#000000" face=""Times New Roman""> - h </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Displays the usage options for this command.</font>
 
|}
 
  
<font size="3" color="#00007f" face="Arial"> '''  Examples  ''' </font>
+
*To display the existing schedules
  
{|
+
zmschedulebackup -q
|- valign="baseline"
 
| width="19.2" |
 
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
 
| <font size="3" color="#000000" face="Arial"> To schedule the default full and incremental backup </font>
 
|}
 
  
<blockquote>
+
*To display the schedules on one line as a command, so that they can be copied to a text file and saved to be used if the application needs to be restored.
  
<font size="3" color="#000000" face=""Times New Roman""> '''zmschedulebackup [-D'''  ''' ] '''</font>
+
  zmschedulebackup -s
 
 
</blockquote>
 
 
 
{|
 
|- valign="baseline"
 
| width="19.2" |
 
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
 
| <font size="3" color="#000000" face="Arial"> To replace the existing schedule with a new schedule </font>
 
|}
 
 
 
<blockquote>
 
 
 
<font size="3" color="#000000" face=""Times New Roman"">  '''zmschedulebackup -R f [schedule] [schedule] '''  </font>
 
 
 
</blockquote>
 
 
 
{|
 
|- valign="baseline"
 
| width="19.2" |
 
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
 
| <font size="3" color="#000000" face="Arial"> To add an additional full backup to the existing schedule </font>
 
|}
 
 
 
<blockquote>
 
 
 
<font size="3" color="#000000" face=""Times New Roman"">  '''zmschedulebackup -A f [schedule] '''  </font>
 
 
 
</blockquote>
 
 
 
{|
 
|- valign="baseline"
 
| width="19.2" |
 
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
 
| <font size="3" color="#000000" face="Arial"> To add an additional incremental backup to the existing schedule </font>
 
|}
 
 
 
<blockquote>
 
 
 
<font size="3" color="#000000" face=""Times New Roman"">  '''zmschedulebackup -A i [schedule]'''  </font>
 
 
 
</blockquote>
 
 
 
{|
 
|- valign="baseline"
 
| width="19.2" |
 
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
 
| <font size="3" color="#000000" face="Arial"> To display the existing schedules a </font>
 
|}
 
 
 
<blockquote>
 
 
 
<font size="3" color="#000000" face=""Times New Roman"">  '''zmschedulebackup -q''' </font>
 
 
 
</blockquote>
 
 
 
{|
 
|- valign="baseline"
 
| width="19.2" |
 
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
 
| <font size="3" color="#000000" face="Arial"> To display the schedules on one line as a command, so that they can be copied to a text file and saved to be used if the application needs to be restored. </font>
 
|}
 
 
 
<blockquote>
 
 
 
<font size="3" color="#000000" face=""Times New Roman"">'''zmschedulebackup -s'''  </font>
 
 
 
</blockquote>
 
  
 
=Further Reading=
 
=Further Reading=

Revision as of 18:37, 5 January 2010

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

  • zmschedulebackup now supports -u for uncompressed zip blob storage.

zmschedulebackup

This command is used to schedule backups and add the command to your cron table. The default schedule is as follows:

  • Full backup, every Saturday at 1:00 a.m. (0 1 * * 6)
  • Incremental backup, Sunday through Friday at 1:00 a.m. (0 1 * * 0-5)

Each crontab entry is a single line composed of five fields separated by a blank space. Specify the fields as follows:

  • minute — 0 through 59
  • hour — 0 through 23
  • day of month — 1 through 31
  • month — 1 through 12
  • day of week — 0 through 7 (0 or 7 is Sunday, or use names)

Type an asterisk (*) in the fields you are not using.

This command automatically writes the schedule to the crontab.

Syntax

zmschedulebackup {-q|-s|-A|-R|-F|-D}[f|i|d|] [“schedule”]

Description

Examples

  • To schedule the default full and incremental backup
zmschedulebackup -D
  • To replace the existing schedule with a new schedule
zmschedulebackup -R f [“schedule”]
  • To add an additional full backup to the existing schedule
zmschedulebackup -A f [“schedule”]
  • To add an additional incremental backup to the existing schedule
zmschedulebackup -A i [“schedule”]
  • To display the existing schedules
zmschedulebackup -q
  • To display the schedules on one line as a command, so that they can be copied to a text file and saved to be used if the application needs to be restored.
zmschedulebackup -s

Further Reading

For more information on planning backup schedules and using the zmschedulebackup command, read the Zimbra backup/restore blog post at http://www.zimbrablog.com/blog/archives/2007/02/45-admins-and-backuprestore.html.

Jump to: navigation, search