Skip to main content
NetApp Knowledge Base

How to run ndmpcopy in ONTAP

Views:
18,214
Visibility:
Public
Votes:
8
Category:
ontap-9
Specialty:
dp
Last Updated:
5/14/2025, 5:05:33 AM

Applies to

ONTAP 9

Description

  • This article describes how to run ndmpcopy
  • The ndmpcopy command is run from the cluster shell, via node run 
  • Ndmpcopy can be run from the command line of either the source or destination storage system to transfer data between two systems
  • Ndmpcopy can also be run on a single storage system, transferring data from one location to another within the same storage system
  • To take advantage of the NDMP Cluster Aware Backup (CAB) extension, all storage systems involved in the ndmpcopy must be in vserver-scoped mode
    • This includes the storage system on which the ndmpcopy command is being run.

Procedure

Prerequisites

NDMP must be enabled for either vserver-scope or node-scope

  • NDMP operates in vserver-scope, by default. 
  • On a system where NDMP has  never been configured, turning NDMP on will enable NDMP in vserver-scope.
  • Node-scope mode available for compatibility, but will be deprecated in a future release.
  • To verify your cluster is running in vserver scope, run the following command:

cluster::> system services ndmp node-scope-mode status

  • If node-scope-mode is disabled, the cluster is configured for vserver scope

Note:  There are two ndmpcopy examples in this article, and they are independent of each other.  Running ndmpcopy in vserver scope are the steps that should be followed.  The next section, Running ndmpcopy in node scope, should only be followed if the cluster is found to be running in node scope.

Running ndmpcopy in vserver scope mode
  1. Enabled ndmp on your vserver

cluster::> vserver services ndmp on -vserver <SVM-name>

  1. Verify ndmp is allowed on the vserver

cluster::> vserver show -vserver <SVM-name> -fields allowed-protocols

  1. Create a user account on the vserver for ndmp

Note: This step is optional as you may use the vserver 'vsadmin' account if you wish.​​​​

cluster::> security login create -user-or-group-name ndmpuser -application ssh -authmethod password -vserver <SVM-name> -role vsadmin-backup

Please enter a password for user 'ndmpuser':
Please enter it again:

  1. Generate an ndmp password for the user account

Note: This password will not be the same as the password for the user account

cluster::> vserver services ndmp generate-password -vserver <SVM-name> -user ndmpuser

 Vserver: svm2
    User: ndmpuser
Password: yMGg5d0LyUG8l1kn

  1. Run the ndmpcopy

When running the ndmpcopy in vserver scope, you should choose a LIF that is assigned to the same vserver as the volume

Note: When copying within the same node/vserver, you must still provide an IP address.

ndmpcopy -sa <username>:<password> -da <username>:<password> <source_SVM-IP>:/<SVM-name>/<volume-name> <dest_SVM-IP>:/<SVM-name>/<volume-name>

cluster::> node run -node node1 ndmpcopy -sa ndmpuser:yMGg5d0LyUG8l1kn -da ndmpuser:yMGg5d0LyUG8l1kn 10.63.107.200:/svm2/vol1 10.63.107.200:/svm2/vol2

Note: When the source or destination path contains spaces or special characters, wrap quotes around the portion of the path that contains them 

node run -node node1 ndmpcopy -sa ndmpuser:yMGg5d0LyUG8l1kn -da ndmpuser:yMGg5d0LyUG8l1kn 10.63.107.200:/svm2/'vol 1' 10.63.107.200:/svm2/'vol 2'

Note: If the SSH session used to run ndmpcopy is closed, either manually or via timeout, it will result in termination of the ndmpcopy operation​​​​​​

Running ndmpcopy in node scope mode
  1. Enable node scope and ndmp

cluster::> system services ndmp node-scope-mode on
cluster::> system services ndmp on -node *

  1. Create an ndmp user and password

cluster::> system services ndmp modify -user-id ndmpuser -node *

Please enter password:
Confirm password:

  1. Run the ndmpcopy

When running ndmpcopy in node scope mode, the IP address should be the node management LIF for the node that hosts the volume

Note: When copying within the same node, you must still provide an IP address

ndmpcopy -sa <username>:<password> -da <username>:<password> <source_node_mgmt_IP>:/<SVM-name>/<volume-name> <dest_node_mgmt_IP>:/<SVM-name>/<volume-name>

cluster::> node run -node node1 ndmpcopy -sa ndmpuser:password -da ndmpuser:password 10.63.107.151:/svm2/vol1 10.63.107.151:/svm2/vol2

Note: When the source or destination path contains spaces or special characters, wrap quotes around the portion of the path that contains them 

node run -node node1 ndmpcopy -sa ndmpuser:yMGg5d0LyUG8l1kn -da ndmpuser:yMGg5d0LyUG8l1kn 10.63.107.200:/svm2/'vol 1' 10.63.107.200:/svm2/'vol 2'

If you receive the error 'ndmpcopy not found', then you must first enable the command:

node> options nodescope.reenabledcmds ndmpcopy

Note: If the SSH session used to run ndmpcopy is closed, either manually or via timeout, it will result in termination of the ndmpcopy operation.

Considerations for long-running ndmpcopy sessions

Additional Information

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.