CLI zmschedulebackup Network Edition only: Difference between revisions
(Updating content to ZCS 6.0... changes not complete) |
(Updating content to ZCS 6.0) |
||
Line 27: | Line 27: | ||
===Description=== | ===Description=== | ||
{|style="width:100%" border="1" cellpadding="5" cellspacing="0" | |||
! align="left" bgcolor="tan" |Name | |||
! align="left" bgcolor="tan" |Command Name | |||
! align="left" bgcolor="tan"|Description | |||
|- | |||
|style="background=white" |help | |||
|<nowiki>-h</nowiki> | |||
|Displays the usage options for this command. | |||
|- | |||
|style="background=white" |query | |||
|<nowiki>-q</nowiki> | |||
|Default command. Displays the existing Zimbra backup schedule. | |||
|- | |||
|style="background=white" |save | |||
|<nowiki>-s</nowiki> | |||
|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. | |||
|- | |||
|style="background=white" |flush | |||
|<nowiki>-F</nowiki> | |||
|Removes the current schedule and cancels all scheduled backups. | |||
|- | |||
|style="background=white" |append | |||
|<nowiki>-A</nowiki> | |||
|Adds an additional specified backup to the current schedule | |||
|- | |||
|style="background=white" |replace | |||
|<nowiki>-R</nowiki> | |||
|Replaces the current schedule with the specified schedule. | |||
|- | |||
|style="background=white" |default | |||
|<nowiki>-D</nowiki> | |||
|Replaces the current schedule with the default schedule. | |||
|- | |||
|style="background=white" |compress | |||
|<nowiki>-z</nowiki> | |||
|Compress email blobs with zip | |||
|- | |||
|style="background=white" |target | |||
|<nowiki>-t</nowiki> | |||
|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 (<nowiki>-</nowiki>t) location is added for incremental scheduled backups, it is ignored.'' | |||
|- | |||
|style="background=white" |account | |||
|<nowiki>-a</nowiki> | |||
|Account specific. The default is all accounts. | |||
|- | |||
|style="background=white" |Incremental Backup | |||
|<nowiki>i</nowiki> | |||
|<nowiki><time specifier></nowiki> Incremental backup. Incremental backup is not used with the auto-grouped backup mode. | |||
|- | |||
|style="background=white" |Full Backup | |||
|<nowiki>f</nowiki> | |||
|Full backup. | |||
|- | |||
|style="background=white" |Delete | |||
|<nowiki>d <arg></nowiki> | |||
|Delete backups. | |||
|} | |||
===Examples=== | ===Examples=== | ||
Line 66: | Line 127: | ||
[[Category:Command Line Interface]] | [[Category:Command Line Interface]] | ||
[[Category:Backup and Restore]] | |||
[[Category:ZCS 6.0]] | [[Category:ZCS 6.0]] | ||
[[Category:ZCS 5.0]] | [[Category:ZCS 5.0]] | ||
[[Category:ZCS 4.5]] | [[Category:ZCS 4.5]] |
Revision as of 19:23, 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
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. |
compress | -z | Compress email blobs with zip |
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. |
Incremental Backup | i | <time specifier> Incremental backup. Incremental backup is not used with the auto-grouped backup mode. |
Full Backup | f | Full backup. |
Delete | d <arg> | Delete backups. |
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
ZCS 5.0
ZCS 4.5
Related Articles
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.