Using Backup and Restore Services on Linux or Solaris

The ndsbackup utility is a command line utility which allows you to archive and restore eDirectory objects to and from a single file called ndsbackupfile. The actions of the ndsbackup utility are controlled by the command line options. The command line option is a string of characters containing exactly one function letter (c, r, t, s, or x) and zero or more function modifiers (letters or digits), depending on the function letter used. The string contains no space characters. Function modifier arguments are listed on the command line in the same order as their corresponding function modifiers appear in the string.

To archive or restore eDirectory objects, you need to specify the fully distinguished name of a leaf object or a container to be archived, extracted, or listed. To archive the whole tree, specify the Tree object. You can also back up the eDirectory schema by specifying Schema as the eDirectory object.

The ndsbackup utility allows you to customize the backup process. You can choose specific eDirectory objects to exclude or include in the backup session. Whether you use Exclude or Include usually depends on the size of the data you want to back up, compared to the size you do not want to back up. By combining the Include and Exclude options, you can control what is backed up. To back up most of the eDirectory tree structure while omitting only a small part, use the Exclude option to omit the part you do not want to back up. Everything that you do not want specifically excluded is included. After you exclude part of the structure, you cannot include objects below that container.

The following sections provide information about backing up and restoring eDirectory objects on Linux or Solaris systems:


ndsbackup

ndsbackup c [fevwXR] [ndsbackupfile] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [eDirectoryobject]ndsbackup r [fevwXR] [ndsbackupfile] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [eDirectoryobject]ndsbackup t [fevXR] [ndsbackupfile] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [eDirectoryobject]ndsbackup x [fevwXR] [ndsbackupfile] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [eDirectoryobject]ndsbackup s [evXR] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [eDirectoryobject]


Table 136. ndsbackup Parameters

ndsbackup Parameter Description

-a

The fully distinguished name of the user with administrator rights to the objects being archived or restored.

f

File. Use the ndsbackupfile argument as the name of the ndsbackupfile. If it is omitted, or if the name of the ndsbackupfile is -, ndsbackup writes to the standard output or reads from the standard input, whichever is appropriate. ndsbackup can be used as the head or tail of a pipeline.

e

Error. Exit immediately with a exit status if an unexpected error occurs.

R

Replica server name/IP address. Use the option to archive or restore eDirectory objects using a server holding the replica of the eDirectory partition. If you omit the R option, the local server is used.

v

Verbose. Output the name of each eDirectory object preceded by the function letter. With the t function, v provides additional information about the ndsbackupfile entries.

w

What. Output the action to be taken and the name of the eDirectory object, then await the user's confirmation. If you enter y, the action is performed. If you enter any other key, the action is not performed. This function modifier cannot be used with the t function.

-I

Include. Open the include file containing a list of eDirectory objects, one per line, and treat it as if each eDirectory object appeared separately on the command line. If an eDirectory object is specified in both the exclude file and the include file (or on the command line), it will be included. Be careful of trailing white spaces.

X

Exclude. Use the exclude-file argument as a file containing a list of eDirectory objects to be excluded from the ndsbackupfile when using the functions c, x, s, or t. Multiple X arguments may be used, with one exclude file per argument. If an eDirectory object is specified in both the exclude file and the include file (or on the command line), it will be included. Be careful of trailing white spaces.

NDSobject

The fully distinguished name of a leaf object or a container to be archived (when the c or r functions are specified), extracted (x) or listed (t). The action applies to all of the objects and (recursively) subordinate objects of that container. To archive the whole tree, specify the Tree object. You can also back up the eDirectory schema by specifying Schema as the eDirectory object. To back up the entire tree along with the schema, specify Full Directory Backup. If you do not specify the eDirectory object to be backed up, ndsbackup uses the default Full Directory Backup option.


Creating the ndsbackupfile

You can use the Create function specified by the c parameter to create the ndsbackupfile into which eDirectory objects are to be archived. Writing begins at the beginning of the file instead of the end. If a specified ndsbackup file exists, it will be overwritten.

To create the ndsbackupfile:

  1. Use the following syntax:

    ndsbackup c [fevwXR] [ndsbackupfile] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [NDSobject]


Replacing Existing Objects for Restore

You can use the Replace function specified by the r option to back up the named eDirectory objects in the specified ndsbackupfile. The eDirectory objects are appended to the specified ndsbackupfile, effectively replacing the existing objects for restore.

To replace existing objects for restore:

  1. Use the following syntax:

    ndsbackup r [fevwXR] [ndsbackupfile] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [NDSobject]


Scanning eDirectory Objects

You can use the Scan function specified by the s option to scan the eDirectory objects in a tree.

To scan the eDirectory objects in a tree:

  1. Use the following syntax:

    ndsbackup s [eSvwXR] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [NDSobject] 


Obtaining a List eDirectory Objects from the ndsbackupfile

You can use the Table of Contents function specified by the t option, to list the names of the specified eDirectory objects each time they occur in the ndsbackupfile. If no argument is given, the names of all eDirectory objects in the ndsbackupfile are listed.

To obtain a list of eDirectory objects from the ndsbackupfile:

  1. Use the following syntax:

    ndsbackup t [fevXR] [ndsbackupfile] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [NDSobject]


Restoring eDirectory Objects to the eDirectory Tree

You can use the Restore function specified by the x option, to extract the named eDirectory objects from the ndsbackupfile and restore to the eDirectory tree. If a named eDirectory object matches a container whose contents have been written to the ndsbackupfile, this container is recursively extracted.

To restore eDirectory objects to the eDirectory tree:

  1. Use the following syntax:

    ndsbackup x [fevwXR] [ndsbackupfile] [exclude-file] [Replica-server-name] [-a admin-user] [-I include-file]... [NDSobject]


Examples

To archive eDirectory objects in the container abc_inc:

  1. Enter the following command:

    ndsbackup cvf ndsbackupfile .O=abc_inc

To archive all the eDirectory objects in a tree:

  1. Enter the following command:

    ndsbackup cvf ndsbackupfile tree_name

To archive the eDirectory schema:

  1. Enter the following command:

    ndsbackup cvf ndsbackupfile Schema

To restore eDirectory objects from ndsbackupfile to eDirectory in the container abc_inc:

  1. Enter the following command:

    ndsbackup xvf ndsbackupfile .O=abc_inc



Previous | Next