Manual Pages


Table of Contents

NAME

na_ndmpcopy - Transfers directory trees between nodes using NDMP.

SYNOPSIS

ndmpcopy [options] source destination

source and destination are of the form [node_name:]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]
[-p]
[-exclude < value >]

DESCRIPTION

Ndmpcopy transfers data between nodes/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 node and restore running on the destination node.

Ndmpcopy is supported on vfilers, as well as the physical node 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:

[node:]path

where node_name is the hostname or IP address of the node and path is the absolute pathname of the directory to be used in the transfer. If you do not specify the node hostname or IP address, ndmpcopy assumes the source and destination nodes to be the same as the node running the ndmpcopy command. ndmpcopy creates the destination directory if it does not already exist. The destination pathname should be in the format:

/vol/<volname>/[path]

where <volname> should be a valid volume on the destination node and [path] is optional.If an invalid pathname is specified then the operation will terminate with an error message.

The node 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 nodes (control connections) and also for communication between the source and destination nodes (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 node authentication is used to authenticate the network connections to the source node. 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 node. Note that even if no password is included, the : after the username must be present.

-da username:password
The destination node authentication is used to authenticate the network connections to the destination node. 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 node. Note that even if no password is included, the : after the username must be present.

-st { text | md5 }
The source node 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 node 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 behavior.

-mcs { inet | inet6 }
The source control connection mode option forces the specified address mode for the source node. 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 node. 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 nodes.

-h
The -h option is used to display the usage and help message.

-p
The -p option is used to ask for passwords interactively, so that they are not displayed on screen.

-exclude <value>
The -exclude option is used to exclude files or directories from the path being backed up through ndmpcopy. <value> can be a comma-separated list of specific files, direcory names or a pattern such as "*.pst","*.txt".

EXAMPLES

In these examples, network host names are used for the nodes. ("myhost" is used for a local node and "remotehost1" and "remotehost2" are used for remote nodes.) If you specify host names when you use the ndmpcopy command, the node 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 nodes. Issue `ndmpd on' on both nodes 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 node (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 node is the same as myhost, you can omit specifying the source and destination node names on the ndmpcopy command line. Also note that when your ndmpcopy command is running on the same node as the source node and/or destination node, 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 node must be specified in this case, because it is a remote node. 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 node 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/dest_path

In the specified example, remotehost1 is the hostname that resolves to an IPv6 address.

Example 7:

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 -exclude "*.pst","*.txt"
             remotehost1:/vol/vol0/source_path
             remotehost2:/vol/vol0/destination_path

In this example, the -exclude "*.pst","*.txt" option is used to exclude all the files of the pattern "*.pst" and "*.txt" from being transferred.

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 nodes involved in the
copy.

     myhost> ndmpd on

Whether the 2 nodes 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 nodes you are using for the copy support NDMP version 3 and/or higher.

     myhost> ndmpd version


Table of Contents