CLI zmschedulebackup Network Edition only: Difference between revisions

No edit summary
 
No edit summary
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==<font size="4" color="#00007f" face="Arial"> ''' zmschedulebackup  ''' </font>==
{{BC|Certified}}
__FORCETOC__
<div class="col-md-12 ibox-content">
=CLI zmschedulebackup Network Edition only=
{{KB|{{ZC}}|{{ZCS 8.6}}|{{ZCS 8.5}}|{{ZCS 8.0}}|}}
{{WIP}}For the most recent information on this CLI, including syntax and description, see [https://www.zimbra.com/docs/ne/latest/administration_guide/wwhelp/wwhimpl/js/html/wwhelp.htm#href=860_admin_ne.Appendix_A%E2%80%82Command_Line_Utilities.html ZCS Administrator's Guide Network Edition > Appendix A Command-Line Utilities].


(Network Edition only)
==zmschedulebackup==
This command is used to schedule backups and add the command to your cron table. Since Zimbra Collaboration 6.0 '''zmschedulebackup''' 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>
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)


<font size="3" color="#000000" face="Arial"> The default schedule is as follows: </font>
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.
|- 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>
|}


{|
This command automatically writes the schedule to the crontab.
|- valign="baseline"
| width="19.2" |
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
| <font size="3" color="#000000" face="Arial"> Incremental backup, Monday through Saturday at 1:00 a.m. (0 1 * * 1-6) </font>
|}


<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>
===Syntax===
<nowiki>zmschedulebackup {-q|-s|-A|-R|-F|-D}[f|i|d|] [“schedule”]</nowiki>


<font size="3" color="#000000" face="Arial"> minute  0 through 59</font>
===Description===
 
{|style="width:100%" border="1" cellpadding="5" cellspacing="0"
<font size="3" color="#000000" face="Arial"> hour 0 through 23</font>
! style="color:white;" align="left" bgcolor="#0087c3" |Name
 
! style="color:white;" align="left" bgcolor="#0087c3" |Command Name
<font size="3" color="#000000" face="Arial"> day of month  1 through 31</font>
! style="color:white;" align="left" bgcolor="#0087c3"|Description
 
|-
<font size="3" color="#000000" face="Arial"> month  1 through 12</font>
| help
 
| style="text-align: center;" | -h
<font size="3" color="#000000" face="Arial"> day of week  0 through 7 (0 or 7 is Sunday)</font>
| Displays the usage options for this command.
 
|-
<font size="3" color="#000000" face="Arial"> Type an asterisk (*) in the fields you are not using. </font>
| query
 
| style="text-align: center;" | -q
<font size="3" color="#000000" face="Arial"> This command automatically writes the schedule to the crontab. </font>
| Default command. Displays the existing Zimbra backup schedule.
 
|-
<font size="3" color="#00007f" face="Arial"> ''' Syntax ''' </font>
| save
 
| style="text-align: center;" | -s
<font size="3" color="#000000" face=""Times New Roman""> '''  zmschedulebackup [-q]|-s|-A|-R|-F|-D] [schedule] [schedule...]  ''' </font>
| 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 size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
| flush
 
| style="text-align: center;" | -F
{| border="2" cellpadding="8"
| Removes the current schedule and cancels all scheduled backups.
|+
|-
| append
| style="text-align: center;" | -A
| Adds an additional specified backup to the current schedule.
|-
| replace
| style="text-align: center;" | -R
| Replaces the current schedule with the specified schedule.
|-
| default
| style="text-align: center;" | -D
| Replaces the current schedule with the default schedule.
|-
| colspan="3" | Options that will be passed to zmbackup
|-
| no compression
| style="text-align: center;" | -n
| Backs up blobs as individual files rather than in zip files
|-
| compress
| style="text-align: center;" | -z
| Backs up blobs in compressed zip files. Ignored if --zipStore is specified.
|-
| --zipStore
|
| Backs up blobs in zip file without compression.
|-
| target
| style="text-align: center;" | -t
| Can be used only to designate a full back target location. The default is /opt/zimbra/backup. '''Note:''' You cannot designate a target for incremental backups. If a target (-t) location is added for incremental scheduled backups, it is ignored.
|-
| account
| style="text-align: center;" | -a
| Account specific. The default is all accounts.
|-
| --mail-report
|
| Send an email report to the admin user.
|-
| --server
|
| server - Mail server hostname. Default is localhost.
|-
| --sync
|
| Runs full backup synchronously.
|-
|-
| valign="middle" |
| --excludeBlobs
<font size="3" color="#00007f" face="Arial"> '''  Name ''' </font>
|  
| valign="middle" |
| Exclude blobs from full backup. If unspecified, server config is used.
<font size="3" color="#00007f" face="Arial"> ''' Command Name''' </font>
| valign="middle" |
<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
|-
|-
| valign="top" |
| --includeBlobs
<font size="3" color="#000000" face=""Times New Roman""><div> </div></font>
|  
| valign="top" |
| Include blobs in full backup. If unspecified, the server config is used.
<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" |
| --excludeHsmBlobs
<font size="3" color="#000000" face=""Times New Roman""><div> </div></font>
|  
| valign="top" |
| Exclude blobs on HSM volumes from full backup. If unspecified, the server config is used.
<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" |
| --includeHsmBlobs
<font size="3" color="#000000" face="Arial"> ''' Common Options ''' </font>
|  
| valign="top" |
| Include blobs on HSM volumes in full backup. If unspecified, the server config is used.
|-
|-
| valign="top" |
| --excludeSearchIndex
<font size="3" color="#000000" face=""Times New Roman"">  Query  </font>
|  
| valign="top" |
| Exclude search index form full backup. If unspecified, the server config is used.
<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" |
| --includeSearchIndex
<font size="3" color="#000000" face=""Times New Roman"">  Save  </font>
|  
| valign="top" |
| Include search index in full backup. If unspecified, the server config is used.
<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" |
| Cron schedule
<font size="3" color="#000000" face=""Times New Roman"">  Flush  </font>
|  
| valign="top" |
| backup-type: <i | f | d arg>
<font size="3" color="#000000" face=""Times New Roman"">  -</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" |
| incremental backup
<font size="3" color="#000000" face=""Times New Roman"">  Replace  </font>
| style="text-align: center;" | i
| valign="top" |
| <time specifier> Incremental backup. Incremental backup is not used with the auto-grouped backup mode.
<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" |
| full backup
<font size="3" color="#000000" face=""Times New Roman""> Default </font>
| style="text-align: center;" | f
| valign="top" |
| Full backup
<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" |
| delete
<font size="3" color="#000000" face=""Times New Roman""> Help </font>
| style="text-align: center;" | d <arg>
| valign="top" |
| Delete backups. <arg> is n(d|m|y)
<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>
 
{|
|- 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>
===Examples===
 
*To schedule the default full and incremental backup
<font size="3" color="#000000" face=""Times New Roman""> '''zmschedulebackup [-D'''  ''' ] '''</font>
zmschedulebackup -D
 
</blockquote>


{|
*To replace the existing schedule with a new schedule
|- valign="baseline"
zmschedulebackup -R f [“schedule”]
| 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>
*To add an additional full backup to the existing schedule
zmschedulebackup -A f [“schedule”]


<font size="3" color="#000000" face=""Times New Roman""> '''zmschedulebackup -R f [schedule] [schedule] '''  </font>
*To add an additional incremental backup to the existing schedule
  zmschedulebackup -A i [“schedule”]


</blockquote>
*To display the existing schedules
<pre>zmschedulebackup -q
Current Schedule:


{|
        f 0 1 * * 6 -a all --mail-report
|- valign="baseline"
        i 0 1 * * 0-5 --mail-report
| width="19.2" |
        d 1m 0 0 * * * --mail-report</pre>
<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>
*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.
<pre>zmschedulebackup -s
-a all --mail-report f "0 1 * * 6"
--mail-report i "0 1 * * 0-5"
--mail-report d 1m "0 0 * * *"</pre>


<font size="3" color="#000000" face=""Times New Roman"">  '''zmschedulebackup -A f [schedule] '''  </font>
=Related Articles=


</blockquote>
*[http://www.zimbrablog.com/blog/archives/2007/02/45-admins-and-backuprestore.html Zimbra Backup/Restore blog post] -- contains more information on planning backup schedules and using the zmschedulebackup command.
 
*[[5.0.x_Network_Edition_Backup_and_Restore]]
{|
|- 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>
{{Article Footer|Zimbra Collaboration 8.6, 8.5, 8.0.x|5/2/2006}}


</blockquote>
[[Category:Command Line Interface]]
[[Category:Backup and Restore]]

Latest revision as of 16:12, 11 July 2015

CLI zmschedulebackup Network Edition only

   KB 1483        Last updated on 2015-07-11  




0.00
(0 votes)

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

zmschedulebackup

This command is used to schedule backups and add the command to your cron table. Since Zimbra Collaboration 6.0 zmschedulebackup supports -u for uncompressed zip blob storage.

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

Name Command Name Description
help -h Displays the usage options for this command.
query -q Default command. Displays the existing Zimbra backup schedule.
save -s 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.
flush -F Removes the current schedule and cancels all scheduled backups.
append -A Adds an additional specified backup to the current schedule.
replace -R Replaces the current schedule with the specified schedule.
default -D Replaces the current schedule with the default schedule.
Options that will be passed to zmbackup
no compression -n Backs up blobs as individual files rather than in zip files
compress -z Backs up blobs in compressed zip files. Ignored if --zipStore is specified.
--zipStore Backs up blobs in zip file without compression.
target -t Can be used only to designate a full back target location. The default is /opt/zimbra/backup. Note: You cannot designate a target for incremental backups. If a target (-t) location is added for incremental scheduled backups, it is ignored.
account -a Account specific. The default is all accounts.
--mail-report Send an email report to the admin user.
--server server - Mail server hostname. Default is localhost.
--sync Runs full backup synchronously.
--excludeBlobs Exclude blobs from full backup. If unspecified, server config is used.
--includeBlobs Include blobs in full backup. If unspecified, the server config is used.
--excludeHsmBlobs Exclude blobs on HSM volumes from full backup. If unspecified, the server config is used.
--includeHsmBlobs Include blobs on HSM volumes in full backup. If unspecified, the server config is used.
--excludeSearchIndex Exclude search index form full backup. If unspecified, the server config is used.
--includeSearchIndex Include search index in full backup. If unspecified, the server config is used.
Cron schedule backup-type:
incremental backup i
full backup f Full backup
delete d <arg> m|y)

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
Current Schedule:

        f 0 1 * * 6 -a all --mail-report
        i 0 1 * * 0-5 --mail-report
        d 1m 0 0 * * * --mail-report
  • 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
 -a all --mail-report f "0 1 * * 6"
 --mail-report i "0 1 * * 0-5"
 --mail-report d 1m "0 0 * * *"

Related Articles


Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0.x Date Created: 5/2/2006
Article ID: https://wiki.zimbra.com/index.php?title=CLI_zmschedulebackup_Network_Edition_only Date Modified: 2015-07-11



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