<?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
! 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
! 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
!
-->
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">
<refmeta>
<refentrytitle><application>restore</application></refentrytitle>
</refmeta>
<refnamediv>
<refname><application>restore</application></refname>
<refpurpose>restore OpenDJ directory data backups</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>restore</command>
<arg>-d <replaceable class="parameter">backupDir</replaceable></arg>
<arg>-I <replaceable class="parameter">backupId</replaceable></arg>
<arg>-l</arg>
<arg>-n</arg>
<sbr/><sbr/>
xpointer='xpointer(//para[@name="s-remote"]/*)'/>
<sbr/><sbr/>
xpointer='xpointer(//para[@name="s-auth"]/*)'/>
<sbr/><sbr/>
xpointer='xpointer(//para[@name="s-task"]/*[not(@name="sc-stop")])'/>
<sbr/><sbr/>
xpointer='xpointer(//para[@name="s-props"]/*)'/>
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to restore a backup of a directory server backend.
</para>
</refsection>
<refsection>
<title>Options</title>
<para>
The following options are supported.
</para>
<variablelist>
<varlistentry>
<term><option>-d, --backupDirectory</option> <replaceable
class="parameter">path</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">id</replaceable></term>
<listitem>
<para>
Use the provided identifier for the backup.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-l, --listBackups</option></term>
<listitem>
<para>
List available backups in the backup directory.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-n, --dry-run</option></term>
<listitem>
<para>
Verify the contents of the backup but do not restore it.
</para>
</listitem>
</varlistentry>
</variablelist>
<refsection>
<title>Task Backend Connection Options</title>
<variablelist>
xpointer='xpointer(//para[@name="l-remote"]/*)'/>
xpointer='xpointer(//para[@name="l-auth"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>Task Scheduling Options</title>
<variablelist>
xpointer='xpointer(//para[@name="l-task"]/*[not(@name="lc-stop")])'/>
</variablelist>
</refsection>
<refsection>
<variablelist>
xpointer='xpointer(//para[@name="l-props"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>General Options</title>
<variablelist>
xpointer='xpointer(//para[@name="l-general"]/*)'/>
</variablelist>
</refsection>
</refsection>
<refsection>
<title>Examples</title>
<informalexample>
<para>
The following example schedules a restore as a task to begin immediatelywhile
OpenDJ directory server is online.
</para>
<literallayout><prompt
-p 4444 -D "cn=Directory Manager" -w password</command></literallayout>
<screen>
Restore task 20110613155052932 scheduled to start Jun 13, 2011 3:50:52 PM CEST
</screen>
</informalexample>
<informalexample>
<para>
The following example shows, how to get a list of available backups and
how to restores data while OpenDJ is offline.
</para>
<literallayout><prompt
<screen>
Backup ID: 20120928102414Z
Is Incremental: false
Is Compressed: false
Is Encrypted: false
Has Unsigned Hash: false
Has Signed Hash: false
Dependent Upon: none
</screen>
<literallayout><prompt
>$ </prompt><command>restore -d $INSTANCE_ROOT/bak/userRoot -I 20120928102414Z</command></literallayout>
<screen>
</screen>
</informalexample>
</refsection>
<refsection>
<title>Exit Codes</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>
</refentry>