CLI - zmbackup Network Edition Only: Difference between revisions

(Adding category)
No edit summary
 
(20 intermediate revisions by 8 users not shown)
Line 1: Line 1:
==<font size="4" color="#00007f" face="Arial"> ''' zmbackup '''</font>==
{{BC|Certified}}
__FORCETOC__
<div class="col-md-12 ibox-content">
=CLI zmbackup Network Edition Only=
{{KB|{{ZC}}|{{ZCS 10.0}}|{{ZCS 9.0}}|{{ZCS 8.0}}|{{ZCS 7.0}}|{{ZCS 6.0}}|}}
{{WIP}}
For the most recent information on this CLI, including syntax and description, see [http://files.zimbra.com/website/docs/7.2/Zimbra_NE_Admin_Guide_7.2.7.pdf ZCS Administrator's Guide Network Edition] and see the Appendix A - Command-Line Utilities.


'''<font size="2" color="#00007f" face="Arial">(Network Edition only) </font>'''
=ZCS 6.0.x=
==zmbackup==
This tool performs full backups and incremental backups for a designated mail host.
This utility has short option names and full names. The short option is preceded by a single dash, while the full option is preceded by a double dash. For example, -f is the same as --fullBackup.


<font size="3" color="#000000" face="Arial"> This tool performs full backups and incremental backups for a designated mail host. You can either specify specific accounts, or, if no accounts are specified, all accounts are included.</font>
===Syntax===
One of -f, -i, or -del must be specified.


<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"">'''-fb'''</font> is the same as --<font size="3" color="#000000" face=""Times New Roman"">'''fullBackup'''</font>.</font>
'''zmbackup {-f | -i | del} {-a <arg>} [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="Arial"> One of -f, -i, or -del must be specified.  </font>
! align="left" bgcolor="tan" |Long Name
 
! align="left" bgcolor="tan" |Short Name
<blockquote>
! align="left" bgcolor="tan"|Description
 
<font size="3" color="#000000" face=""Times New Roman""> '''  zmbackup {-f | -i | del} -acct (account) [options]  ''' </font>
 
</blockquote>
 
===<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>===
 
{| border="2" cellpadding="8"
|+
|-
| valign="middle" |
<font size="3" color="#00007f" face="Arial"> ''' Long Name ''' </font>
| valign="middle" |
<font size="3" color="#00007f" face="Arial"> ''' Short Name''' </font>
| valign="middle" |
<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--account</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  --fullBackup  ''' </font>
|<nowiki>-a</nowiki>
| valign="top" |
|'''<arg>''' Account email addresses separated by white space or '''all''' for all accounts. This option is not specified for auto-grouped backups since the system knows which accounts to backup every night.
<font size="3" color="#000000" face=""Times New Roman""> '''  -f  ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Starts a full backup. </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--debug</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  -- incrementalBackup ''' </font>
|<nowiki>-d</nowiki>
| valign="top" |
|Display diagnostics for debugging purposes.
<font size="3" color="#000000" face=""Times New Roman""> '''  -i  ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Starts an incremental backup. </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--delete</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  --account  ''' </font>
|<nowiki>-del</nowiki>
| valign="top" |
|'''<arg>''' Deletes the backups including and prior to the specified label, date <nowiki>(YYYY/MM/DD[-hh:mm:ss]) or period (nn(d|m|y])</nowiki>.
<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. Enter <font size="3" color="#000000" face=""Times New Roman"">'''all'''</font> to backup all accounts. Required.</font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--fullBackup</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --delete ''' </font>
|<nowiki>-f</nowiki>
| valign="top" |
|Starts a full backup. In auto-grouped backup mode, this option also copies the redologs since the last backup (which is the main function of an incremental backup).
<font size="3" color="#000000" face=""Times New Roman""> ''' -del ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> < <font size="3" color="#000000" face=""Times New Roman""> '''label|date''' </font>> Deletes the backup session on or prior to the specified label/date. </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--help</nowiki>
<font size="3" color="#000000" face="Arial"> ''' Common Options ''' </font>
|<nowiki>-h</nowiki>
| valign="top" | <font size="3" color="#000000" face="Arial">   </font>
|Displays the usage options for this command.
| valign="top" | <font size="3" color="#000000" face="Arial">  </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--incrementalBackup</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --fullBackup ''' </font>
|<nowiki>-i</nowiki>
| valign="top" |
|Starts an incremental backup. This option is not available in the auto-grouped backup mode.
<font size="3" color="#000000" face=""Times New Roman""> ''' -f ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Starts full backup. </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--server</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --incrementalBackup''' </font>
|<nowiki>-s</nowiki>
| valign="top" |
|'''<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.
<font size="3" color="#000000" face=""Times New Roman""> ''' -i ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Starts incremental backup. </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--sync</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  --server  ''' </font>
|<nowiki>-sync</nowiki>
| valign="top" |
|Runs full backup synchronously.
<font size="3" color="#000000" face=""Times New Roman""> '''  -s  ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial">  <font size="3" color="#000000" face=""Times New Roman""> '''<arg> ''' </font> 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" |
|style="background=white" |<nowiki>--target</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --sync ''' </font>
|<nowiki>-t</nowiki>
| valign="top" |
|'''<arg>''' Specifies the target backup location. The default is <zimbra_home>/backup.
<font size="3" color="#000000" face=""Times New Roman""> ''' -sync ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Runs full backup synchronously. </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--zip</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  --target  ''' </font>
|<nowiki>-z</nowiki>
| valign="top" |
|Backs up blobs in compressed zip files. Ignored if --zipStore is specified.
<font size="3" color="#000000" face=""Times New Roman""> '''  -t  ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> <font size="3" color="#000000" face=""Times New Roman""> '''<arg> ''' </font> Specifics the target backup location. The default is <zimbra_home>/backup. </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--zipStore</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' --zip ''' </font>
|<nowiki></nowiki>
| valign="top" |
|Backup up blobs in zip files without compression. (default)
<font size="3" color="#000000" face=""Times New Roman""> ''' -z ''' </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Zips email blobs in backup. </font>
|-
|-
| valign="top" |
|style="background=white" |<nowiki>--noZip</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  --help  ''' </font>
|<nowiki></nowiki>
| valign="top" |
|No zip or compression. (old behavior, hardlinks)
<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>
===Examples===
In these examples, the server (-s) is server1.domain.com. The (-t) is not required if the target is the default directory, (zimbra_home/backup).


<font size="3" color="#000000" face="Arial"> In these examples, the server (-s) is ''' ''' <font size="2" face=""Courier New"">server1.domain.com</font>. The (-t) is not required if the target is the default directory, <font size="3" color="#000000" face=""Times New Roman"">'''(zimbra_home/backup'''</font>).</font>
*Perform a full backup of all mailboxes on server1
 
{|
|- valign="baseline"
| width="19.2" |
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
| <font size="3" color="#000000" face="Arial"> Perform a full backup of all mailboxes on '''server1'''.</font>
|}


<blockquote>
zmbackup -f -a all -s server1.domain.com


<font size="2" color="#000000" face=""Courier New""> <font size="2" face="Times New Roman, Times, serif">'''zmbackup -f '''</font> <font face="Times New Roman, Times, serif">'''<font size="2"><font color="#000000">-a all </font>-s server1.domain.com </font>'''<br /></font> </font>
*Perform incremental backup of all mailboxes on server1 since last full backup


</blockquote>
zmbackup -i -a all -s server1.domain.com


{|
*Perform full backup of only user1’s mailbox on server1. Note that hostname does not need full domain if account is used.
|- valign="baseline"
| width="19.2" |
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
| <font size="3" color="#000000" face="Arial"> Perform incremental backup of all mailboxes on '''server1''' since last full backup.</font>
|}


<blockquote>
zmbackup -f -a user1@domain.com -s server1


<font size="2" color="#000000" face=""Courier New""> ''' <font face="Times New Roman, Times, serif">zmbackup -i </font>''' <font face="Times New Roman, Times, serif">'''<font size="3" color="#000000">-a all </font>-s server1.domain.com'''</font>'''<br />''' </font>
=ZCS 5.0.x=
*[http://www.zimbra.com/docs/ne/5.0.19/administration_guide/A_app-command-line.18.7.html#1267917 ZCS Administrator's Guide Network Edition 5.0 > Appendix A Command-Line Utilities > zmbackup]


</blockquote>
=ZCS 4.5.x=
*[http://www.zimbra.com/docs/ne/4.5.10/administration_guide/A_app-command-line.14.4.html#1173299 ZCS Administrator's Guide Network Edition 4.5 > Appendix A Command-Line Utilities > zmbackup]


{|
=Notes=
|- valign="baseline"
Resulting backup sessions make use of ''hard links'' to previous backup sessions to save space on the filesystem. Take this into account when performing tape backups and when foreseeing disk usage, eg.:
| width="19.2" |
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
| <font size="3" color="#000000" face="Arial"> Perform full backup of only  '''user1'''’s mailbox on '''server1'''. Note that hostname does not need full domain if account is used.</font>
|}


<blockquote>
<pre>[zimbra@gw1a ~]$ cd /opt/zimbra/backup/sessions
[zimbra@gw1a sessions]$ du -sh full-20080805.101920.991
75G    full-20080805.101920.991
[zimbra@gw1a sessions]$ du -sh *full*
75G    full-20080801.230004.637
2.5G    full-20080805.101920.991
[zimbra@gw1a sessions]$ du -shl *full*
75G    full-20080801.230004.637
75G    full-20080805.101920.991</pre>


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


</blockquote>
=Related Articles=


{|
* [[CLI zmschedulebackup Network Edition only|zmschedulebackup]] - This command is used to schedule backups and add the command to your cron table.
|- valign="baseline"
| width="19.2" |
<font size="3" color="#000000" face=""Times New Roman""> '''• ''' </font>
| <font size="3" color="#000000" face="Arial"> Perform incremental backup of  '''user1'''’s mailbox on '''server1'''.</font>
|}


<blockquote>


<font size="2" color="#000000" face=""Courier New""> '''<font face="Times New Roman, Times, serif">zmbackup -i -s server1 </font>''' <font face="Times New Roman, Times, serif">'''<font size="3" color="#000000">-a </font>user1@domain.com'''</font><br /></font>
{{Article Footer|Zimbra Collaboration 10.0,9.0,8.0,7.0, 6.0|5/2/2006}}


[[Category:Backup and Restore]]
[[Category:Command Line Interface]]
[[Category:Command Line Interface]]
[[Category:ZCS 10.0]]
[[Category:ZCS 9.0]]
[[Category:ZCS 8.0]]
[[Category:ZCS 7.0]]
[[Category:ZCS 6.0]]

Latest revision as of 13:26, 1 September 2022

CLI zmbackup Network Edition Only

   KB 1482        Last updated on 2022-09-1  




0.00
(0 votes)

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

ZCS 6.0.x

zmbackup

This tool performs full backups and incremental backups for a designated mail host. This utility has short option names and full names. The short option is preceded by a single dash, while the full option is preceded by a double dash. For example, -f is the same as --fullBackup.

Syntax

One of -f, -i, or -del must be specified.

zmbackup {-f | -i | del} {-a <arg>} [options]

Description

Long Name Short Name Description
--account -a <arg> Account email addresses separated by white space or all for all accounts. This option is not specified for auto-grouped backups since the system knows which accounts to backup every night.
--debug -d Display diagnostics for debugging purposes.
--delete -del <arg> Deletes the backups including and prior to the specified label, date (YYYY/MM/DD[-hh:mm:ss]) or period (nn(d|m|y]).
--fullBackup -f Starts a full backup. In auto-grouped backup mode, this option also copies the redologs since the last backup (which is the main function of an incremental backup).
--help -h Displays the usage options for this command.
--incrementalBackup -i Starts an incremental backup. This option is not available in the auto-grouped backup mode.
--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.
--sync -sync Runs full backup synchronously.
--target -t <arg> Specifies the target backup location. The default is <zimbra_home>/backup.
--zip -z Backs up blobs in compressed zip files. Ignored if --zipStore is specified.
--zipStore Backup up blobs in zip files without compression. (default)
--noZip No zip or compression. (old behavior, hardlinks)

Examples

In these examples, the server (-s) is server1.domain.com. The (-t) is not required if the target is the default directory, (zimbra_home/backup).

  • Perform a full backup of all mailboxes on server1
zmbackup -f -a all -s server1.domain.com
  • Perform incremental backup of all mailboxes on server1 since last full backup
zmbackup -i -a all -s server1.domain.com
  • Perform full backup of only user1’s mailbox on server1. Note that hostname does not need full domain if account is used.
zmbackup -f -a user1@domain.com -s server1

ZCS 5.0.x

ZCS 4.5.x

Notes

Resulting backup sessions make use of hard links to previous backup sessions to save space on the filesystem. Take this into account when performing tape backups and when foreseeing disk usage, eg.:

[zimbra@gw1a ~]$ cd /opt/zimbra/backup/sessions
[zimbra@gw1a sessions]$ du -sh full-20080805.101920.991
75G     full-20080805.101920.991
[zimbra@gw1a sessions]$ du -sh *full*
75G     full-20080801.230004.637
2.5G    full-20080805.101920.991
[zimbra@gw1a sessions]$ du -shl *full*
75G     full-20080801.230004.637
75G     full-20080805.101920.991


Related Articles

  • zmschedulebackup - This command is used to schedule backups and add the command to your cron table.


Verified Against: Zimbra Collaboration 10.0,9.0,8.0,7.0, 6.0 Date Created: 5/2/2006
Article ID: https://wiki.zimbra.com/index.php?title=CLI_-_zmbackup_Network_Edition_Only Date Modified: 2022-09-01



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