Skip to main content

Transfer ONTAP data using ndmpcopy

Contributors netapp-lenida netapp-sumathi netapp-aaron-holt netapp-thomi netapp-aoife netapp-aherbin

The ndmpcopy nodeshell command transfers data between storage systems that support NDMP v4. You can perform both full and incremental data transfers. You can transfer full or partial volumes, qtrees, directories, or individual files.

About this task

Using ONTAP 8.x and earlier releases, incremental transfers are limited to a maximum of two levels (one full and up to two incremental backups).

Beginning with ONTAP 9.0 and later releases, incremental transfers are limited to a maximum of nine levels (one full and up to nine incremental backups).

You can run ndmpcopy at the nodeshell command line of the source and destination storage systems, or a storage system that is neither the source nor the destination of the data transfer. You can also run ndmpcopy on a single storage system that is both the source and the destination of the data transfer.

You can use IPv4 or IPv6 addresses of the source and destination storage systems in the ndmpcopy command. The path format is /vserver_name/volume_name \[path\].

Steps
  1. Enable NDMP service on the source and destination storage systems:

    If you are performing data transfer at the source or destination in…​

    Use the following command…​

    SVM-scoped NDMP mode

    vserver services ndmp on

    Note

    For NDMP authentication in the admin SVM, the user account is admin and the user role is admin or backup. In the data SVM, the user account is vsadmin and the user role is vsadmin or vsadmin-backup role.

    Node-scoped NDMP mode

    system services ndmp on

  2. Transfer data within a storage system or between storage systems using the ndmpcopy command at the nodeshell:

    ::> system node run -node <node_name> < ndmpcopy [options] source_IP:source_path destination_IP:destination_path [-mcs {inet|inet6}] [-mcd {inet|inet6}] [-md {inet|inet6}]

    Note

    DNS names are not supported in ndmpcopy. You must provide the IP address of the source and the destination. The loopback address (127.0.0.1) is not supported for the source IP address or the destination IP address.

    • The ndmpcopy command determines the address mode for control connections as follows:

      • The address mode for control connection corresponds to the IP address provided.

      • You can override these rules by using the -mcs and -mcd options.

    • If the source or the destination is the ONTAP system, then depending on the NDMP mode (node-scoped or SVM-scoped), use an IP address that allows access to the target volume.

    • source_path and destination_path are the absolute path names till the granular level of volume, qtree, directory or file.

    • -mcs specifies the preferred addressing mode for the control connection to the source storage system.

      inet indicates an IPv4 address mode and inet6 indicates an IPv6 address mode.

    • -mcd specifies the preferred addressing mode for the control connection to the destination storage system.

      inet indicates an IPv4 address mode and inet6 indicates an IPv6 address mode.

    • -md specifies the preferred addressing mode for data transfers between the source and the destination storage systems.

      inet indicates an IPv4 address mode and inet6 indicates an IPv6 address mode.

      If you do not use the -md option in the ndmpcopy command, the addressing mode for the data connection is determined as follows:

      • If either of the addresses specified for the control connections is an IPv6 address, the address mode for the data connection is IPv6.

      • If both the addresses specified for the control connections are IPv4 addresses, the ndmpcopy command first attempts an IPv6 address mode for the data connection.

        If that fails, the command uses an IPv4 address mode.

        Note

        An IPv6 address, if specified, must be enclosed within square brackets.

        This sample command migrates data from a source path (source_path) to a destination path (destination_path).

        > ndmpcopy -sa admin:<ndmp_password> -da admin:<ndmp_password>
         -st md5 -dt md5 192.0.2.129:/<src_svm>/<src_vol> 192.0.2.131:/<dst_svm>/<dst_vol>

        This sample command explicitly sets the control connections and the data connection to use IPv6 address mode:

        > ndmpcopy -sa admin:<ndmp_password> -da admin:<ndmp_password> -st md5 -dt md5 -mcs inet6 -mcd inet6 -md
         inet6 [2001:0db8:1:1:209:6bff:feae:6d67]:/<src_svm>/<src_vol> [2001:0ec9:1:1:200:7cgg:gfdf:7e78]:/<dst_svm>/<dst_vol>

Learn more about the commands described in this procedure in the ONTAP command reference.

Options for the ndmpcopy command

You should understand the options available for the ndmpcopy nodeshell command to successfully transfer data.

The following table lists the available options.

Option Description

-sa username:[password]

This option sets the source authentication user name and password for connecting to the source storage system. This is a mandatory option.

For a user without admin privilege, you must specify the user's system-generated NDMP-specific password. The system-generated password is mandatory for both admin and non-admin users.

-da username:[password]

This option sets the destination authentication user name and password for connecting to the destination storage system. This is a mandatory option.

-st {md5|text}

This option sets the source authentication type to be used when connecting to the source storage system.This is a mandatory option and therefore the user should provide either the text or md5 option.

-dt {md5|text}

This option sets the destination authentication type to be used when connecting to the destination storage system.

-l

This option sets the dump level used for the transfer to the specified value of level.Valid values are 0, 1, to 9, where 0 indicates a full transfer and 1 to 9 specifies an incremental transfer. The default is 0.

-d

This option enables generation of ndmpcopy debug log messages. The ndmpcopy debug log files are located in the /mroot/etc/log root volume. The ndmpcopy debug log file names are in the ndmpcopy.yyyymmdd format.

-f

This option enables the forced mode. This mode enables system files to be overwritten in the /etc directory on the root of the 7-Mode volume.

-h

This option prints the help message.

-p

This option prompts you to enter the password for source and destination authorization. This password overrides the password specified for -sa and -da options.

Note

You can use this option only when the command is running in an interactive console.

-exclude

This option excludes specified files or directories from the path specified for data transfer. The value can be a comma-separated list of directory or file names such as .pst or .txt. The maximum number of exclude patterns supported is 32 and the maximum number of characters supported is 255.