<?xml version="1.0" encoding="UTF-8"?>
<!--
! CCPL HEADER START
!
! This work is licensed under the Creative Commons
! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
! To view a copy of this license, visit
! http://creativecommons.org/licenses/by-nc-nd/3.0/
! or send a letter to Creative Commons, 444 Castro Street,
! Suite 900, Mountain View, California, 94041, USA.
!
! You can also obtain a copy of the license at
! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! If applicable, add the following below this CCPL HEADER, with the fields
! enclosed by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CCPL HEADER END
!
! Copyright 2011-2012 ForgeRock AS
! Portions Copyright 2013 Jens Elkner
!
-->
<refentry xml:id="backup-1" xmlns="http://docbook.org/ns/docbook" version="5.0"
xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
<refmeta>
<refentrytitle><application>backup</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>backup</application></refname>
<refpurpose>back up OpenDJ directory data</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>backup</command>
<arg>-a</arg>
<arg>-n <replaceable class="parameter">backendName</replaceable></arg>
<arg>-d backupDir</arg>
<arg>-I backupId</arg>
<arg>-i</arg>
<arg>-B baseId</arg>
<arg>-c</arg>
<arg>-y</arg>
<arg>-A</arg>
<arg>-s</arg>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-task"]/*)'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-remote"]/*)'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-auth"]/*)'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-props"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to back up one or more directory server backends.
</para>
</refsection>
<refsection>
<title>Options</title>
<para>
The following options are supported.
</para>
<variablelist>
<varlistentry>
<term><option>-a, --backUpAll</option></term>
<listitem>
<para>
Back up all backends in the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-n, --backendID</option> <replaceable class="parameter">backendName</replaceable></term>
<listitem>
<para>
Backend ID for the backend to archive.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d, --backupDirectory</option> <replaceable
class="parameter">backupDir</replaceable></term>
<listitem>
<para>
Path to the target directory for the backup file(s).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-I, --backupID</option> <replaceable
class="parameter">backupID</replaceable></term>
<listitem>
<para>
Use the provided identifier for the backup.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-i, --incremental</option></term>
<listitem>
<para>
Perform an incremental backup rather than a full backup.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-B, --incrementalBaseID</option> <replaceable
class="parameter">backupID</replaceable></term>
<listitem>
<para>
Backup ID of the source archive for an incremental backup.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c, --compress</option></term>
<listitem>
<para>
Compress the backup content.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-y, --encrypt</option></term>
<listitem>
<para>
Encrypt the backup contents.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-A, --hash</option></term>
<listitem>
<para>
Generate a hash of the backup contents.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s, --signHash</option></term>
<listitem>
<para>
Sign the hash of the backup contents.
</para>
</listitem>
</varlistentry>
</variablelist>
<refsection>
<title>Task Backend Connection Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-remote"]/*")])'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-auth"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>Task Scheduling Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-task"]/*[not(@name="lc-stop")])'/>
</variablelist>
</refsection>
<refsection>
<title>Utility Input/Output Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-props"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>General Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-general"]/*)'/>
</variablelist>
</refsection>
</refsection>
<refsection>
<title>Examples</title>
<informalexample>
<para>
The following example backs up all user data while the server is online.
</para>
<literallayout><prompt
>$ </prompt><command>backup -p 4444 -D "cn=Directory Manager" -w password -a \
-d $INSTANCE_ROOT/bak -t 0</command></literallayout>
<screen>
Backup task 20110613143801866 scheduled to start Jun 13, 2011 2:38:01 PM CEST
</screen>
</informalexample>
<informalexample>
<para>
The following example schedules back up of all user data every night at 2 AM
when the server is online, and notifies diradmin@example.com when finished, or
on error.
</para>
<literallayout><prompt
>$ </prompt><command>backup -p 4444 -D "cn=Directory Manager" -w password -a \
-d $INSTANCE_ROOT/bak --recurringTask "00 02 * * *" \
--completionNotify diradmin@example.com \
--errorNotify diradmin@example.com</command></literallayout>
<screen>
Recurring Backup task BackupTask-988d6adf-4d65-44bf-8546-6ea74a2480b0 scheduled successfully
</screen>
</informalexample>
<informalexample>
<para>
The following example backs up all user data while the server is offline.
</para>
<literallayout><prompt
>$ </prompt><command>backup -a -d $INSTANCE_ROOT/bak</command></literallayout>
<screen>
[28/Sep/2012:12:14:22 +0200] ... msg=The backup process completed successfully
</screen>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
<refsection>
<title>Exit Status</title>
<variablelist>
<varlistentry>
<term><errorcode>0</errorcode></term>
<listitem>
<para>
The command completed successfully.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>1</errorcode></term>
<listitem>
<para>
An error occurred while parsing the command-line arguments.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>See Also</title>
<para>
<citerefentry>
<refentrytitle>opendj</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>crontab</refentrytitle><xi:include href="common.xml"
xpointer='xpointer(//manvolnum[@name="crontab"])'/>
</citerefentry>
</para>
</refsection>
</refentry>