Monday, October 21, 2013

NetApp - ndmpcopy - transfering directory trees between filers using NDMP

Ndmpcopy transfers data between filers/vfilers using the Network Data Management Protocol (NDMP) versions 3 and higher. This process can be thought of as creating a dedicated data pipe between dump running on the source filer and restore running on the destination filer.
 
Ndmpcopy is supported on vfilers, as well as the physical filer named vfiler0. Use vfiler context or vfiler run to issue Ndmpcopy commands on a specific vfiler. See na_vfiler(1) for details on how to issue commands on vfilers. The use of Ndmpcopy on vfilers requires a MultiStore license.


EXAMPLES

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

Before starting the ndmpcopy operation, the NDMP request daemon ndmpd has to be enabled on both the source and destination filers. Issue `ndmpd on' on both filers to enable the request daemon.
Example 1:
This command migrates data from a source path (source_path) to a different destination path (destination_path) on the same filer (myhost).
     myhost> ndmpcopy -sa username:password
             -da username:password
             myhost:/vol/vol0/source_path
             myhost:/vol/vol0/destination_path
You can also use this shorter form of the command to achieve the same result.
     myhost> ndmpcopy /vol/vol0/source_path
             /vol/vol0/destination_path
Because you are running the ndmpcopy command on myhost and the source and destination filer is the same as myhost, you can omit specifying the source and destination filer names on the ndmpcopy command line. Also note that when your ndmpcopy command is running on the same filer as the source filer and/or destination filer, you can omit the -sa and/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 filer must be specified in this case, because it is a remote filer. Also 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 has been set to text. The ndmpcopy command tool running on myhost will authenticate with the source filer 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
Note that the -l 1 option is used to do a level 1 transfer. Example 5:
This command describes the behaviour of ndmpcopy without the -f option. In this case, the /etc directory and its contents on the root volume of remotehost1 are protected from being overwritten with the /etc directory from myhost. This is intended to avoid the unintentional changing of the system characteristics after the root volume migration is completed.
     myhost> ndmpcopy -da username:password /vol/rootvol
             remotehost1:/vol/rootvol
If you intentionally wish to overwrite the /etc directory, during the root volume migration, then use the -f flag as in the following copy.
     myhost> ndmpcopy -da username:password -f /vol/rootvol
             remotehost1:/vol/rootvol

No comments:

Post a Comment