7321N/A<?xml version="1.0" encoding="UTF-8"?>
7321N/A<!--
7321N/A ! CCPL HEADER START
7321N/A !
7321N/A ! This work is licensed under the Creative Commons
7321N/A ! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
7321N/A ! To view a copy of this license, visit
7321N/A ! http://creativecommons.org/licenses/by-nc-nd/3.0/
7321N/A ! or send a letter to Creative Commons, 444 Castro Street,
7321N/A ! Suite 900, Mountain View, California, 94041, USA.
7321N/A !
7321N/A ! You can also obtain a copy of the license at
7321N/A ! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
7321N/A ! See the License for the specific language governing permissions
7321N/A ! and limitations under the License.
7321N/A !
7321N/A ! If applicable, add the following below this CCPL HEADER, with the fields
7321N/A ! enclosed by brackets "[]" replaced with your own identifying information:
7321N/A ! Portions Copyright [yyyy] [name of copyright owner]
7321N/A !
7321N/A ! CCPL HEADER END
7321N/A !
7321N/A ! Copyright 2011-2014 ForgeRock AS
7321N/A !
7321N/A-->
7321N/A<refentry xml:id='restore-1'
7321N/A xmlns='http://docbook.org/ns/docbook'
7321N/A version='5.0' xml:lang='en'
7321N/A xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
7321N/A xsi:schemaLocation='http://docbook.org/ns/docbook
7321N/A http://docbook.org/xml/5.0/xsd/docbook.xsd'>
7321N/A <info><copyright><year>2011-2014</year><holder>ForgeRock AS</holder></copyright></info>
7321N/A <refmeta>
7321N/A <refentrytitle>restore</refentrytitle><manvolnum>1</manvolnum>
7321N/A <refmiscinfo class="software">OpenDJ</refmiscinfo>
7321N/A <refmiscinfo class="version"><?eval ${docTargetVersion}?></refmiscinfo>
7321N/A </refmeta>
7321N/A <refnamediv>
7321N/A <refname>restore</refname>
7321N/A <refpurpose>restore OpenDJ directory data backups</refpurpose>
7321N/A </refnamediv>
7321N/A <refsynopsisdiv>
7321N/A <cmdsynopsis>
7321N/A <command>restore</command>
7321N/A <arg choice="req">options</arg>
7321N/A </cmdsynopsis>
7321N/A </refsynopsisdiv>
7321N/A <refsect1>
7321N/A <title>Description</title>
7321N/A <para>This utility can be used to restore a backup of a directory server
7321N/A backend.</para>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Options</title>
7321N/A <para>The following options are supported.</para>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term><option>-d, --backupDirectory {backupDir}</option></term>
7321N/A <listitem>
7321N/A <para>Path to the target directory for the backup file(s)</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-I, --backupID {backupID}</option></term>
7321N/A <listitem>
7321N/A <para>Use the provided identifier for the backup</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-l, --listBackups</option></term>
7321N/A <listitem>
7321N/A <para>List available backups in the backup directory</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-n, --dry-run</option></term>
7321N/A <listitem>
7321N/A <para>Verify the contents of the backup but do not restore it</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A <refsect2>
7321N/A <title>Task Backend Connection Options</title>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term><option>--connectTimeout {timeout}</option></term>
7321N/A <listitem>
7321N/A <para>Maximum length of time (in milliseconds) that can be taken to
7321N/A establish a connection. Use '0' to specify no time out.</para>
7321N/A <para>Default value: 30000</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-D, --bindDN {bindDN}</option></term>
7321N/A <listitem>
7321N/A <para>DN to use to bind to the server</para>
7321N/A <para>Default value: cn=Directory Manager</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-h, --hostname {host}</option></term>
7321N/A <listitem>
7321N/A <para>Directory server hostname or IP address</para>
7321N/A <para>Default value: localhost.localdomain</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-j, --bindPasswordFile {bindPasswordFile}</option></term>
7321N/A <listitem>
7321N/A <para>Bind password file</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-K, --keyStorePath {keyStorePath}</option></term>
7321N/A <listitem>
7321N/A <para>Certificate key store path</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-N, --certNickname {nickname}</option></term>
7321N/A <listitem>
7321N/A <para>Nickname of certificate for SSL client authentication</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-o, --saslOption {name=value}</option></term>
7321N/A <listitem>
7321N/A <para>SASL bind options</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-p, --port {port}</option></term>
7321N/A <listitem>
7321N/A <para>Directory server administration port number</para>
7321N/A <para>Default value: 4444</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-P, --trustStorePath {trustStorePath}</option></term>
7321N/A <listitem>
7321N/A <para>Certificate trust store path</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-T, --trustStorePassword {trustStorePassword}</option></term>
7321N/A <listitem>
7321N/A <para>Certificate trust store PIN</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-u, --keyStorePasswordFile {keyStorePasswordFile}</option></term>
7321N/A <listitem>
7321N/A <para>Certificate key store PIN file</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-U, --trustStorePasswordFile {path}</option></term>
7321N/A <listitem>
7321N/A <para>Certificate trust store PIN file</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-w, --bindPassword {bindPassword}</option></term>
7321N/A <listitem>
7321N/A <para>Password to use to bind to the server</para>
7321N/A <para>Use <option>-w -</option> to have the command prompt for the
7321N/A password, rather than enter the password on the command line.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-W, --keyStorePassword {keyStorePassword}</option></term>
7321N/A <listitem>
7321N/A <para>Certificate key store PIN</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-X, --trustAll</option></term>
7321N/A <listitem>
7321N/A <para>Trust all server SSL certificates</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect2>
7321N/A <refsect2>
7321N/A <title>Task Scheduling Options</title>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term><option>--completionNotify {emailAddress}</option></term>
7321N/A <listitem>
7321N/A <para>Email address of a recipient to be notified when the task
7321N/A completes. This option may be specified more than once.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>--dependency {taskID}</option></term>
7321N/A <listitem>
7321N/A <para>ID of a task upon which this task depends. A task will not start
7321N/A execution until all its dependencies have completed execution.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>--errorNotify {emailAddress}</option></term>
7321N/A <listitem>
7321N/A <para>Email address of a recipient to be notified if an error occurs
7321N/A when this task executes. This option may be specified more than
7321N/A once.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>--failedDependencyAction {action}</option></term>
7321N/A <listitem>
7321N/A <para>Action this task will take should one if its dependent tasks fail.
7321N/A The value must be one of PROCESS, CANCEL, DISABLE. If not specified
7321N/A defaults to CANCEL.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>--recurringTask {schedulePattern}</option></term>
7321N/A <listitem>
7321N/A <para>Indicates the task is recurring and will be scheduled according
7321N/A to the value argument expressed in crontab(5) compatible time/date
7321N/A pattern.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-t, --start {startTime}</option></term>
7321N/A <listitem>
7321N/A <para>Indicates the date/time at which this operation will start when
7321N/A scheduled as a server task expressed in YYYYMMDDhhmmssZ format for UTC
7321N/A time or YYYYMMDDhhmmss for local time. A value of '0' will cause the
7321N/A task to be scheduled for immediate execution. When this option is
7321N/A specified the operation will be scheduled to start at the specified
7321N/A time after which this utility will exit immediately.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect2>
7321N/A <refsect2>
7321N/A <title>Utility Input/Output Options</title>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term><option>--noPropertiesFile</option></term>
7321N/A <listitem>
7321N/A <para>No properties file will be used to get default command line
7321N/A argument values</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>--propertiesFilePath {propertiesFilePath}</option></term>
7321N/A <listitem>
7321N/A <para>Path to the file containing default property values used for
7321N/A command line arguments</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect2>
7321N/A <refsect2>
7321N/A <title>General Options</title>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term><option>-V, --version</option></term>
7321N/A <listitem>
7321N/A <para>Display version information</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-?, -H, --help</option></term>
7321N/A <listitem>
7321N/A <para>Display usage information</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect2>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Exit Codes</title>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term>0</term>
7321N/A <listitem>
7321N/A <para>The command completed successfully.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term>1</term>
7321N/A <listitem>
7321N/A <para>An error occurred while parsing the command-line arguments.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Examples</title>
7321N/A <para>The following example schedules a restore as a task to begin
7321N/A immediately while OpenDJ directory server is online.</para>
7321N/A
7321N/A <screen>
7321N/A$ restore -p 4444 -D "cn=Directory Manager" -w password
7321N/A -d /path/to/opendj/bak -I 20110613080032 -t 0
7321N/ARestore task 20110613155052932 scheduled to start Jun 13, 2011 3:50:52 PM CEST
7321N/A </screen>
7321N/A
7321N/A <para>The following example restores data while OpenDJ is offline.</para>
7321N/A
7321N/A <screen>
7321N/A$ <userinput>stop-ds</userinput>
7321N/A<computeroutput>Stopping Server...
7321N/A...</computeroutput>
7321N/A
7321N/A$ <userinput>restore --backupDirectory /path/to/opendj/bak/userRoot \
7321N/A --listBackups</userinput>
7321N/A<computeroutput>Backup ID: 20120928102414Z
7321N/ABackup Date: 28/Sep/2012:12:24:17 +0200
7321N/AIs Incremental: false
7321N/AIs Compressed: false
7321N/AIs Encrypted: false
7321N/AHas Unsigned Hash: false
7321N/AHas Signed Hash: false
7321N/ADependent Upon: none</computeroutput>
7321N/A
7321N/A$ <userinput>restore --backupDirectory /path/to/opendj/bak/userRoot \
7321N/A --backupID 20120928102414Z</userinput>
7321N/A<computeroutput>[28/Sep/2012:12:26:20 +0200] ... msg=Restored: 00000000.jdb (size 355179)</computeroutput>
7321N/A
7321N/A$ <userinput>start-ds</userinput>
7321N/A<computeroutput>[28/Sep/2012:12:27:29 +0200] ... The Directory Server has started successfully</computeroutput>
7321N/A </screen>
7321N/A </refsect1>
7321N/A</refentry>