How to use “ndmpcopy” in clustered Data ONTAP 8.2.x

Introduction

“ndmpcopy” in clustered Data ONTAP has two modes

  1. node-scope-mode : you need to track the volume location if a volume move is performed
  2. vserver-scope-mode : no issues, even if the volume is moved to a different node. 

In this scenario i’ll use vserver-scope-mode to perform a “ndmpocpy” within the same cluster and same SVM.

In my test I copied a 1GB file to a new folder under same volume.

Login to the cluster

snowy-mgmt::> set diag -rows 0
Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y

List of volumes on SVM “snowy”

snowy-mgmt::*> vol show -vserver snowy
(volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
snowy     SNOWY62_vol001 snowy01_hybdata_01 online RW 1TB    83.20GB   91%
snowy     SNOWY62_vol001_sv snowy02_hybdata_01 online DP 1TB 84.91GB   91%
snowy     HRauhome01   snowy01_hybdfc_01 online RW       100GB    94.96GB    5%
snowy     rootvol      snowy01_hybdfc_01 online RW        20MB    18.88MB    5%
4 entries were displayed.

snowy-mgmt::*> df -g SNOWY62_vol001
Filesystem               total       used      avail capacity  Mounted on                 Vserver
/vol/SNOWY62_vol001/ 972GB       3GB       83GB      91%  /SNOWY62_vol001       snowy
/vol/SNOWY62_vol001/.snapshot 51GB 0GB     51GB       0%  /SNOWY62_vol001/.snapshot  snowy
2 entries were displayed.

snowy-mgmt::*> vol show -vserver snowy -fields volume,junction-path
(volume show)
vserver volume              junction-path
------- ------------------- --------------------
snowy   SNOWY62_vol001 /SNOWY62_vol001
snowy   SNOWY62_vol001_sv -
snowy   HRauhome01          /hrauhome01
snowy   rootvol             /
4 entries were displayed.

Create a “ndmpuser” with role “backup”

snowy-mgmt::*> security login show
Vserver: snowy
Authentication                  Acct
UserName         Application Method         Role Name        Locked
---------------- ----------- -------------- ---------------- ------
vsadmin          ontapi      password       vsadmin          yes
vsadmin          ssh         password       vsadmin          yes

Vserver: snowy-mgmt
Authentication                  Acct
UserName         Application Method         Role Name        Locked
---------------- ----------- -------------- ---------------- ------
admin            console     password       admin            no
admin            http        password       admin            no
admin            ontapi      password       admin            no
admin            service-processor password admin            no
admin            ssh         password       admin            no
autosupport      console     password       autosupport      yes
8 entries were displayed.

snowy-mgmt::*> security login create -username ndmpuser -application ssh -authmethod password -role backup -vserver snowy-mgmt
Please enter a password for user 'ndmpuser':
Please enter it again:

snowy-mgmt::*> vserver services ndmp generate-password -vserver snowy-mgmt -user ndmpuser
Vserver: snowy-mgmt
User: ndmpuser
Password: Ip3gRJchR0FGPLA7

Turn on “ndmp” service on the cluster mgmt. SVM

snowy-mgmt::*> vserver services ndmp on -vserver snowy-mgmt

In the Nodeshell initiate “ndmpcopy”

snowy-mgmt::*> node run -node snowy-01
Type 'exit' or 'Ctrl-D' to return to the CLI

snowy-01> ndmpcopy
usage:
ndmpcopy [<options>] <source> <destination>
<source> and <destination> are of the form [<filer>:]<path>
If an IPv6 address is specified, it must be enclosed in square brackets

options:
[-sa <username>:<password>]
[-da <username>:<password>]
    source/destination filer authentication
[-st { text | md5 }]
[-dt { text | md5 }]
    source/destination filer authentication type
    default is md5
[-l { 0 | 1 | 2 }]
    incremental level
    default is 0
[-d]
    debug mode
[-f]
    force flag, to copy system files
[-mcs { inet | inet6 }]
    force specified address mode for source control connection
[-mcd { inet | inet6 }]
    force specified address mode for destination control connection
[-md { inet | inet6 }]
    force specified address mode for data connection
[-h]
    display this message
[-p]
    accept the password interactively
[-exclude <value>]
    exclude the files/dirs from backup path

snowy-01>
snowy-01> ndmpcopy -sa ndmpuser:Ip3gRJchR0FGPLA7 -da ndmpuser:Ip3gRJchR0FGPLA7 10.10.2.72:/snowy/SNOWY62_vol001/TestFil2_002 10.10.2.72:/snowy/SNOWY62_vol001/destination
Ndmpcopy: Starting copy [ 14 ] ...
Ndmpcopy: 10.10.2.72: Notify: Connection established
Ndmpcopy: 10.10.2.72: Notify: Connection established
Ndmpcopy: 10.10.2.72: Connect: Authentication successful
Ndmpcopy: 10.10.2.72: Connect: Authentication successful
Ndmpcopy: 10.10.2.72: Log: DUMP: creating "/snowy/SNOWY62_vol001/../snapshot_for_backup.7" snapshot.
Ndmpcopy: 10.10.2.72: Log: DUMP: Using Partial Volume Dump of selected subtrees
Ndmpcopy: 10.10.2.72: Log: DUMP: Using snapshot_for_backup.7 snapshot
Ndmpcopy: 10.10.2.72: Log: DUMP: Date of this level 0 dump: Tue Apr  5 08:27:43 2016.
Ndmpcopy: 10.10.2.72: Log: DUMP: Date of last level 0 dump: the epoch.
Ndmpcopy: 10.10.2.72: Log: DUMP: Dumping /snowy/SNOWY62_vol001/TestFil2_002 to NDMP connection
Ndmpcopy: 10.10.2.72: Log: DUMP: mapping (Pass I)[regular files]
Ndmpcopy: 10.10.2.72: Log: DUMP: Reading file names from NDMP.
Ndmpcopy: 10.10.2.72: Log: DUMP: mapping (Pass II)[directories]
Ndmpcopy: 10.10.2.72: Log: DUMP: estimated 1050638 KB.
Ndmpcopy: 10.10.2.72: Log: DUMP: dumping (Pass III) [directories]
Ndmpcopy: 10.10.2.72: Log: DUMP: dumping (Pass IV) [regular files]
Ndmpcopy: 10.10.2.72: Log: RESTORE: Tue Apr  5 08:27:52 2016: Begin level 0 restore
Ndmpcopy: 10.10.2.72: Log: RESTORE: Tue Apr  5 08:27:54 2016: Reading directories from the backup
Ndmpcopy: 10.10.2.72: Log: RESTORE: Warning: /vol/SNOWY62_vol001/destination/ will not be restored as a qtree: exists as a normal subdirectory.
Ndmpcopy: 10.10.2.72: Log: RESTORE: Could not create qtree `/vol/SNOWY62_vol001/destination/'. Creating a regular directory instead.
Ndmpcopy: 10.10.2.72: Log: RESTORE: Tue Apr  5 08:27:55 2016: Creating files and directories.
Ndmpcopy: 10.10.2.72: Log: RESTORE: Tue Apr  5 08:27:55 2016: Writing data to files.
Ndmpcopy: 10.10.2.72: Log: ACL_START is '1075865600'
Ndmpcopy: 10.10.2.72: Log: DUMP: dumping (Pass V) [ACLs]
Ndmpcopy: 10.10.2.72: Log: DUMP: 1050657 KB
Ndmpcopy: 10.10.2.72: Log: DUMP: DUMP IS DONE
Ndmpcopy: 10.10.2.72: Log: RESTORE: RESTORE IS DONE
Ndmpcopy: 10.10.2.72: Notify: restore successful
Ndmpcopy: 10.10.2.72: Log: DUMP: Deleting "/snowy/SNOWY62_vol001/../snapshot_for_backup.7" snapshot.
Ndmpcopy: 10.10.2.72: Log: DUMP_DATE is '5754776159'
Ndmpcopy: 10.10.2.72: Notify: dump successful
Ndmpcopy: Transfer successful [ 0 hours, 1 minutes, 26 seconds ]
Ndmpcopy: Done

Although I used the cluster-mgmt lif in the ndmpcopy syntax, I didn’t see any traffic flowing on the lif 

snowy-mgmt::*> statistics show-periodic -node cluster:summary -object lif:vserver -instance snowy-mgmt -counter instance_name|recv_data|sent_data -interval 1
snowy-mgmt: lif:vserver.snowy-mgmt: 4/5/2016 08:27:20
instance     recv     sent   Complete     Number of
name     data     data  Aggregation  Constituents
-------- -------- -------- ----------- -------------
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1
snowy-mgmt     0B       0B      No      1

Another “ndmpcopy” job with different statistics command
snowy-01> ndmpcopy -sa ndmpuser:Ip3gRJchR0FGPLA7 -da ndmpuser:Ip3gRJchR0FGPLA7 10.10.2.72:/snowy/SNOWY62_vol001/TestFil1_001 10.10.2.72:/snowy/SNOWY62_vol001/destination
Ndmpcopy: Starting copy [ 15 ] ...
Ndmpcopy: 10.10.2.72: Notify: Connection established
Ndmpcopy: 10.10.2.72: Notify: Connection established
Ndmpcopy: 10.10.2.72: Connect: Authentication successful
Ndmpcopy: 10.10.2.72: Connect: Authentication successful
Ndmpcopy: 10.10.2.72: Log: DUMP: creating "/snowy/SNOWY62_vol001/../snapshot_for_backup.9" snapshot.
Ndmpcopy: 10.10.2.72: Log: DUMP: Using Partial Volume Dump of selected subtrees
Ndmpcopy: 10.10.2.72: Log: DUMP: Using snapshot_for_backup.9 snapshot
Ndmpcopy: 10.10.2.72: Log: DUMP: Date of this level 0 dump: Tue Apr  5 08:30:40 2016.
Ndmpcopy: 10.10.2.72: Log: DUMP: Date of last level 0 dump: the epoch.
Ndmpcopy: 10.10.2.72: Log: DUMP: Dumping /snowy/SNOWY62_vol001/TestFil1_001 to NDMP connection
Ndmpcopy: 10.10.2.72: Log: DUMP: mapping (Pass I)[regular files]
Ndmpcopy: 10.10.2.72: Log: DUMP: Reading file names from NDMP.
Ndmpcopy: 10.10.2.72: Log: DUMP: mapping (Pass II)[directories]
Ndmpcopy: 10.10.2.72: Log: DUMP: estimated 1050638 KB.
Ndmpcopy: 10.10.2.72: Log: DUMP: dumping (Pass III) [directories]
Ndmpcopy: 10.10.2.72: Log: DUMP: dumping (Pass IV) [regular files]
Ndmpcopy: 10.10.2.72: Log: RESTORE: Tue Apr  5 08:30:47 2016: Begin level 0 restore
Ndmpcopy: 10.10.2.72: Log: RESTORE: Tue Apr  5 08:30:49 2016: Reading directories from the backup
Ndmpcopy: 10.10.2.72: Log: RESTORE: Warning: /vol/SNOWY62_vol001/destination/ will not be restored as a qtree: exists as a normal subdirectory.
Ndmpcopy: 10.10.2.72: Log: RESTORE: Could not create qtree `/vol/SNOWY62_vol001/destination/'. Creating a regular directory instead.
Ndmpcopy: 10.10.2.72: Log: RESTORE: Tue Apr  5 08:30:50 2016: Creating files and directories.
Ndmpcopy: 10.10.2.72: Log: RESTORE: Tue Apr  5 08:30:50 2016: Writing data to files.
Ndmpcopy: 10.10.2.72: Log: ACL_START is '1075865600'
Ndmpcopy: 10.10.2.72: Log: DUMP: dumping (Pass V) [ACLs]
Ndmpcopy: 10.10.2.72: Log: DUMP: 1050657 KB
Ndmpcopy: 10.10.2.72: Log: DUMP: DUMP IS DONE
Ndmpcopy: 10.10.2.72: Log: DUMP: Deleting "/snowy/SNOWY62_vol001/../snapshot_for_backup.9" snapshot.
Ndmpcopy: 10.10.2.72: Log: RESTORE: RESTORE IS DONE
Ndmpcopy: 10.10.2.72: Notify: restore successful
Ndmpcopy: 10.10.2.72: Log: DUMP_DATE is '5754776336'
Ndmpcopy: 10.10.2.72: Notify: dump successful
Ndmpcopy: Transfer successful [ 0 hours, 1 minutes, 20 seconds ]
Ndmpcopy: Done
snowy-01>

snowy-mgmt::*> statistics show-periodic -object lif -instance snowy-mgmt:cluster_mgmt -counter instance_name|recv_data|sent_data -interval 1
snowy-mgmt: lif.snowy-mgmt:cluster_mgmt: 4/5/2016 08:30:10
instance     recv     sent   Complete     Number of
name     data     data  Aggregation  Constituents
-------- -------- -------- ----------- -------------
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a
snowy-mgmt:cluster_mgmt 0B 0B      n/a      n/a

Leave a Reply

Your email address will not be published. Required fields are marked *