Tuesday, October 22, 2013

Netapp NDMP copy command examples

You can migrate data from the source path to a destination path on the same storage system or to a different destination path on a remote host. You can also migrate data from a source path on a remote host to a destination path on the same host or to a destination path on a remote host.
In these examples, 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.

Example of migrating data from a source path to a different destination path on the same storage system

This sample 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

The following 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 of migrating data from a source path to a different destination path on a remote host

This sample 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 of migrating data from a source path on remote host to a destination path on the local storage system

This sample 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 of migrating data from a source path on a remote host to a destination path on another remote host

This sample 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 of overwriting the /etc directory during the root volume migration

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. This helps prevent 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

Example of the ndmpcopy command where the address modes are explicitly set to IPv6

This sample command explicitly sets the control connections and the data connection to use IPv6 address mode. In this command remotehost1 is the host name that resolves to an IPv6 address.

myhost>ndmpcopy -sa username:password -da username:password -l 0 -mcs inet6 -mcd 
inet6 -md inet6 remotehost1:/vol/vol0/source_path [2001:0db8::10]:/vol/vol0/desti
nation_path

No comments:

Post a Comment