Wednesday, November 19, 2014

How to use ndmpcopy

You can migrate data from the source volume to a destination volume on the same storage system or to a different destination volume on a remote host. You can also migrate data from a source volume on a remote host to a destination volume on the same host or to a destination volume on a remote host.
In these examples, netapp1 is used for a local storage system and netapp2 and netapp3 are used for remote storage systems. If you specify host names when you use the ndmpcopy command, the storage systemrunning 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 (netapp1).
netapp1>ndmpcopy -sa username:password -da username:password
netapp1:/vol/vol0/source_path netapp1:/vol/vol0/destination_path
The following shorter form of the command achieves the same purpose:
netapp1>ndmpcopy /vol/vol0/source_path /vol/vol0/destination_path
Because you are running the ndmpcopy command on netapp1 and the source and destination storage system are the same as netapp1, 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 netapp2.
netapp1>ndmpcopy -da username:password /vol/vol0/source_path netapp2:/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 netapp3 to a destination path (destination_path) on netapp1.
netapp1>ndmpcopy -sa username:password -st text netapp3:/vol/vol0/source_path /vol/vol0/destination_path
The source authentication type specified by -st is text. The ndmpcopy command tool running on netapp1 will authenticate with the source storage system by 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 netapp2 to a destination path (destination_path) on netapp3.
netapp1>ndmpcopy -sa username:password -da username:password -l 1 netapp2:/vol/vol0/source_path netapp3:/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 netapp2 are protected from being overwritten with the/etc directory from netapp1. This helps prevent unintentional changing of the system characteristics after the root volume migration is completed.
netapp1>ndmpcopy -da username:password /vol/rootvol netapp2:/vol/rootvol
To intentionally overwrite the/etc directory during the root volume migration, use the -f flag as shown in the following example.
netapp1>ndmpcopy -da username:password -f /vol/rootvol netapp2:/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 netapp2 is the host name that resolves to an IPv6 address.
netapp1>ndmpcopy -sa username:password -da username:password -l 0 -mcs inet6 -mcd inet6 -md inet6 netapp2:/vol/vol0/source_path [2001:0db8::10]:/vol/vol0/destination_path


Source:-  For more details on “ndmpcopy” please refer https://library.netapp.com/

No comments:

Post a Comment