CLI zmschedulebackup Network Edition only: Difference between revisions
No edit summary |
|||
Line 26: | Line 26: | ||
===Description=== | ===Description=== | ||
{|style="width:100%" border="1" cellpadding="5" cellspacing="0" | {|style="width:100%" border="1" cellpadding="5" cellspacing="0" | ||
! align="left" bgcolor=" | ! align="left" bgcolor="#0087c3" |Name | ||
! align="left" bgcolor=" | ! align="left" bgcolor="#0087c3" |Command Name | ||
! align="left" bgcolor=" | ! align="left" bgcolor="#0087c3"|Description | ||
|- | |- | ||
|style=" | | help | ||
| style="text-align: center;" | -h | |||
|Displays the usage options for this command. | | Displays the usage options for this command. | ||
|- | |- | ||
|style=" | | query | ||
| style="text-align: center;" | -q | |||
|Default command. | | Default command. Displays the existing Zimbra backup schedule. | ||
|- | |- | ||
|style=" | | save | ||
| style="text-align: center;" | -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. | | 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=" | | flush | ||
| style="text-align: center;" | -F | |||
|Removes the current schedule and cancels all scheduled backups. | | Removes the current schedule and cancels all scheduled backups. | ||
|- | |- | ||
|style=" | | append | ||
| style="text-align: center;" | -A | |||
|Adds an additional specified backup to the current schedule | | Adds an additional specified backup to the current schedule. | ||
|- | |- | ||
|style=" | | replace | ||
| style="text-align: center;" | -R | |||
|Replaces the current schedule with the specified schedule. | | Replaces the current schedule with the specified schedule. | ||
|- | |- | ||
|style=" | | default | ||
| style="text-align: center;" | -D | |||
|Replaces the current schedule with the default schedule. | | Replaces the current schedule with the default schedule. | ||
|- | |- | ||
| | | colspan="3" | Options that will be passed to zmbackup | ||
|- | |- | ||
|style=" | | no compression | ||
| style="text-align: center;" | -n | |||
| | | Backs up blobs as individual files rather than in zip files | ||
|- | |- | ||
|style=" | | 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. | ||
|- | |- | ||
|style=" | | 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. | |||
|- | |- | ||
|style=" | | account | ||
|< | | style="text-align: center;" | -a | ||
|Delete backups. | | 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: <i | f | d arg> | |||
|- | |||
| | |||
| | |||
| | |||
|- | |||
| incremental backup | |||
| style="text-align: center;" | i | |||
| <time specifier> Incremental backup. Incremental backup is not used with the auto-grouped backup mode. | |||
|- | |||
| full backup | |||
| style="text-align: center;" | f | |||
| Full backup | |||
|- | |||
| delete | |||
| style="text-align: center;" | d <arg> | |||
| Delete backups. <arg> is n(d|m|y) | |||
|} | |} | ||
===Examples=== | ===Examples=== |
Revision as of 13:32, 23 June 2015
Article Information |
---|
This article applies to the following ZCS versions. |
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. |
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
- 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
Related Articles
- 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