logo
Manual Pages
Table of Contents

NAME

na_ndmpcopy - transfers directory trees between filers using NDMP

SYNOPSIS

ndmpcopy [options] source destination source and destination are of the form [filer:]path options:
[-sa username:password]
[-da username:password]
[-st { text | md5 }]
[-dt { text | md5 }]
[-l { 0 | 1 | 2 }]
[-d]
[-f]
[-mcs { inet | inet6 }]
[-mcd { inet | inet6 }]
[-md { inet | inet6 }]
[-h]

DESCRIPTION

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. The password used must be the NDMP password as described in the ndmpd man page. The source and destination for the copy are specified in the following format: [filer:]path where filer is the hostname or IP address of the filer and path is the absolute pathname of the directory to be used in the transfer. If you do not specify the filer hostname or IP address, ndmpcopy assumes the source and destination filers to be the same as the filer running the ndmpcopy command. ndmpcopy creates the destination directory if it does not already exist. When ndmpcopy receives a destination pathname, the following rules are applied to determine what volume that path is referencing and the data is migrated accordingly: Case 1: No /vol in the pathname. Default to the root volume. Case 2: /vol/volume in the pathname and volume is a real volume on the filer. Target at your volume. Case 3: /vol/volume in the pathname and volume is not a real volume on the filer. Default to the root volume. The filer will print the full destination path when ndmpcopy operation successfully completes. When running ndmpcopy against a vfiler, all the source and destination paths must live in volumes exclusively owned by the vfiler. ndmpcopy supports IPv6 addresses. IPv6 address can be used to connect to source and destination filers (control connections) and also for communication between the source and destination filers (data connection). ndmpcopy by default accepts both IPv6 (inet6) and IPv4 (inet) address modes. In a mixed mode environment, IPv6 address has precedence over an IPv4 address. ndmpcopy determines the address mode for the data connection based on the address mode of the control connections as follows: If either of the IP addresses specified are IPv6 for the control connections, then the data connection address mode will be IPv6. If both the IP addresses specified are IPv4 for the control connections, then the data connection address mode will be IPv4. When a DNS name is specified for the control connection, ndmpcopy will first attempt an IPv6 DNS lookup followed by an IPv4 DNS lookup. The data connection address mode will be determined accordingly. To force the address modes for control and data connections, the user can use options to override the specified behavior. If an IPv6 address is specified, it must be enclosed in square brackets.

OPTIONS

The following options may be used in any order:
-sa username:password
The source filer authentication is used to authenticate the network connections to the source filer. If the option is used, username: must always be specified. pass_word should be left blank if there is no password configured for the username on the source filer. Note that even if no password is included, the : after the username must be present.
-da username:password
The destination filer authentication is used to authenticate the network connections to the destination filer. If the option is used, username: must always be specified. password should be left blank if there is no password configured for the username on the source filer. Note that even if no password is included, the : after the username must be present.
-st { text | md5 }
The source filer authentication type is used to identify the authentication mechanism. The default is md5, which encrypts passwords before they are passed over the network. The text authentication does not provide this benefit and should be used with caution.
-dt { text | md5 }
The destination filer authentication type is used to identify the authentication mechanism. The default is md5, which encrypts passwords before they are passed over the network. The text authentication does not provide this benefit and should be used with caution.
-l { 0 | 1 | 2 }
The incremental level to be used for the transfer is restricted to 0, 1 or 2 only. The default level used is 0. You can do a level 0 transfer at any time, following which you can sequentially do one level 1 and one level 2 transfer.
-d
The debug mode option allows ndmpcopy to generate diagnostic/debugging information while it runs. The extra diagnostic information is sent only to the ndmpcopy log file.
-f
The force flag, is used to enable overwriting of the system files in the /etc directory on the root volume. Example 5 below describes this behaviour.
-mcs { inet | inet6 }
The source control connection mode option forces the specified address mode for the source filer. If an IPv6 address is specified, it must be enclosed within square brackets.
-mcd { inet | inet6 }
The destination control connection mode option forces the specified address mode for the destination filer. If an IPv6 address is specified, it must be enclosed within square brackets.
-md { inet | inet6 }
The data connection mode option forces the specified address mode for communication between the source and destination filers.
-h
The -h option is used to display the usage and help message.

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
Example 6: This command describes the usage of ndmpcopy where the address mode for both control and data connections is explicitly forced to IPv6.
     myhost> ndmpcopy -sa username:password
             -da username:password -l 0 -mcs inet6 -mcd inet6 -md inet6
             remotehost1:/vol/vol0/source_path
             [xx:xx:xx:xx:xx:xx:xx:xx]:/vol/vol0/destination_path
In the specified example, remotehost1 is the hostname that resolves to an IPv6 address.

FILES

/etc/log/ndmpcopy.yyyymmdd - The ndmpcopy debug log files

SEE ALSO

na_dump(1), na_ndmpd(1), na_restore(1), na_vfiler(1)

NOTES

Check the following things before running the ndmpcopy: Whether ndmpd is installed and turned on, on the source and destination filers involved in the copy.
     myhost> ndmpd on
Whether the 2 filers can ping each other with first their hostnames and if not then their IP addresses. If both do not work, then it usually denotes an incorrect network setup.
     myhost> ping remotehost
     myhost> ping ip address of remotehost
Make sure that the Data ONTAP release on the filers you are using for the copy support NDMP version 3 and/or higher.
     myhost> ndmpd version

Table of Contents