Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Copying data with ndmpcopy

What ndmpcopy is  Top

The ndmpcopy command enables a storage system administrator to transfer file system data between storage systems that support NDMP v3 or v4 and the UNIX file system (UFS) dump format.

Using the ndmpcopy command, you can carry out both full and incremental data transfers; however, incremental transfers are limited to a maximum of two levels (one full and up to two incremental). You can transfer full or partial volumes, qtrees, or directories, but not individual files.

ndmpcopy functions as a simple NDMP data management application (backup application) that performs data transfers by initiating a backup operation on the source storage system and recovery operation on the destination storage system. It establishes separate NDMP control connections with the source and destination storage systems, creates a single NDMP data connection between the storage systems, and initiates backup and recovery operations that result in the desired data transfer between the source and destination.

You can invoke it at the command line of the source storage system, the destination storage system, or a storage system that is neither the source nor the destination of the data transfer.

You can also invoke ndmpcopy on a single storage system that is both the source and the destination of the data transfer. See the ndmpcopy examples, next, for more information on supported data transfer topologies.

How to copy data using ndmpcopy  Top

To copy data within a storage system or between storage systems using ndmpcopy, complete this step.

Note
The command can also be entered from a storage system that is not the source or the destination.

Step

Action

1

Enter the following command:

ndmpcopy [options][source_filer:]source_path 
[destination_filer:]destination_path

Descriptions of the options and arguments follow.

options can be one or more of the following:

-sa username:[password] source authorization specifies the user name and password for connecting to the source storage system.

Note
If you specify a user without root privilege who requires a password, you must specify that user's system-generated NDMP-specific password rather than that user's regular storage system account password. See Generating an NDMP-specific password for non-root administrators.

-da username:[password] destination authorization specifies the user name and password for connecting to the destination storage system.

-st {challenge|text} sets the source authentication type to be used when connecting to the source storage system.

-dt {challenge|text} sets the destination authentication type to be used when connecting to the destination storage system.

By default, challenge is the authentication type used. The text authentication type exchanges the user name and password in clear text. The challenge authentication type exchanges the user name and password in encrypted form.

-l level sets the dump level used for the transfer to the specified value of level. Valid values for level are 0, 1, and 2, where 0 indicates a full transfer and 1 or 2 an incremental transfer. The default is 0.

-d enables generation of ndmpcopy debug log messages. ndmpcopy debug log files appear in the root volume /etc/log directory. The ndmpcopy debug log file names are in the form ndmpcopy.yyyymmdd.

-f enables forced mode. This mode enables overwriting system files in the /etc directory on the root volume. See Example 5 for details.

-h prints the help message.

source_filer and destination_filer can be host names or IP addresses

If destination_path does not specify a volume, or specifies a non-existent volume, the root volume is used.

Examples of the ndmpcopy command  Top

In these examples, network host names are used for the storage systems. ("myhost" is used for a local storage system and "remotehost1" and "remotehost2" are used for remote storage systems.) If you specify host names when you use the ndmpcopy command, the storage system running the ndmpcopy command should be able to resolve these names to their IP addresses. In UNIX, you can use the ping command to make sure that host name resolution works.

Example 1:

This command migrates data from a source path (source_path) to a different destination path (destination_path) on the same storage system (myhost).

myhost> ndmpcopy -sa username:password -da username:password 
myhost:/vol/vol0/source_path myhost:/vol/vol0/destination_path

This shorter form of the command achieves the same purpose:

myhost> ndmpcopy /vol/vol0/source_path /vol/vol0/destination_path

Because you are running the ndmpcopy command on myhost and the source and destination storage system are the same as myhost, you can omit the source and destination storage system names on the ndmpcopy command line. When your ndmpcopy command is running on the same storage system as the source storage system or destination storage system, you can also omit the -sa or -da options.

Example 2:

This command migrates data from a source path (source_path) to a different destination path (destination_path) on remotehost1.

myhost> ndmpcopy -da username:password /vol/vol0/source_path 
remotehost1:/vol/vol0/destination_path

The destination storage system must be specified in this case, because it is a remote storage system. The destination authorization is needed, but not the source authorization.

Example 3:

This command migrates data from a source path (source_path) on remotehost2 to a destination path (destination_path) on myhost.

myhost> ndmpcopy -sa username:password -st text 
remotehost2:/vol/vol0/source_path /vol/vol0/destination_path

The source authentication type specified by -st is text. The ndmpcopy command tool running on myhost will authenticate with the source storage system using text authentication.

Example 4:

This command migrates data from a source path (source_path) on remotehost1 to a destination path (destination_path) on remotehost2.

myhost> ndmpcopy -sa username:password -da username:password -l 1 
remotehost1:/vol/vol0/source_path 
remotehost2:/vol/vol0/destination_path

The -l 1 option is used to do a level 1 transfer.

Example 5:

Without the -f option, the /etc directory and its contents on the root volume of remotehost1 are protected from being overwritten with the /etc directory from myhost, preventing unintentional changing of the system characteristics after the root volume migration is completed.

myhost> ndmpcopy -da username:password /vol/rootvol 
remotehost1:/vol/rootvol

To intentionally overwrite the /etc directory during the root volume migration, use the -f flag as in the following example.

myhost> ndmpcopy -da username:password -f /vol/rootvol 
remotehost1:/vol/rootvol

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments