How to NDMPCOPY from 7-Mode to Clustered Data ONTAP

In the following post we cover copying some data using NDMP, from Data ONTAP 7-Mode 8.1.4P6, to Clustered Data ONTAP 8.2.2P1. It’s pretty easy to do and the use case is restoring old SnapVault data from 7-Mode to CDOT.

1) 7-Mode Lab Setup

7-Mode System      = FAS01 (on 192.168.168.70)
7-Mode CIFS Server = FAS01.lab.priv

Test volume = vol001
Test share  = vol001$
Test folder = /vol/vol001/RESTORETHIS

vol create vol001 -l en -s none aggr1 2g

qtree security /vol/vol001 ntfs

cifs shares -add vol001$ /vol/vol001


2) CDOT Lab Setup

CDOT Cluster     = CLU01 (Cluster Mgmt on 192.168.168.100)
CDOT Node        = CLU01N1 (Node Mgmt on 192.168.168.101)
CDOT SVM         = CLU01V1 (Data LIF on 192.168.168.102)
CDOT CIFS Server = CLU01V1.lab.priv

Test volume = cvol001 (mounted /cvol001)
Test share  = cvol001$

vol create cvol001 -aggregate aggr1 -size 2g -junction-path /cvol001 -space-guarantee none -security-style ntfs -language en

cifs share create cvol001$ /cvol001


3) 7-Mode Enabling NDMP

Enable ndmpd on the 7-Mode system.
Create a user “ndmp” in the “Backup Operators” builtin group >

ndmpd on

useradmin user add ndmp -g "Backup Operators"


Display the ndmpd password for the user ndmp, and record this password string >

ndmpd password ndmp
password kYGBBPqXk68pde04


Set NDMP to accept both plaintext and md5 authentication requests:

options ndmpd.authtype plaintext,challenge


4) CDOT Enabling NDMP

Create a Cluster user “ndmp”, with ssh access, and the backup role ::>

security login create -username ndmp -application ssh -authmethod password -role backup -vserver CLU01


Generate/display the ndmp password for the user “ndmp”, and record this password string ::>

vserver services ndmp generate-password -vserver CLU01 -user ndmp

 Vserver: CLU01
    User: ndmp
Password: q6VW6w4yMChQwWUg


Enable ndmp on the Cluster ::>

vserver services ndmp on -vserver CLU01


5) Using NDMPCOPY to restore from 7-Mode to Clustered Data ONTAP

From our 7-Mode System (FAS01), we run the restore with the command below >

ndmpcopy -d -sa ndmp:kYGBBPqXk68pde04 -st md5 -da ndmp:q6VW6w4yMChQwWUg -dt md5 192.168.168.70:/vol/vol001/RESTORETHIS 192.168.168.101:/CLU01V1/cvol001/RESTORETHIS


Note 1: The folder RESTORETHIS does not need to exist on CDOT.
Note 2: The ndmpcopy command syntax is >
ndmpcopy -d -sa {source_user}:{source_pass} -st {auth_type} -da {dest_user}:{dest_pass} -dt {auth_type} {hostname_or_IP}:{source_path} {hostname_or_IP}:{dest_path}


APPENDIX: ndmpcopy example output

FAS01> ndmpcopy -d -sa ndmp:kYGBBPqXk68pde04 -st md5 -da ndmp:q6VW6w4yMChQwWUg -dt md5 192.168.168.70:/vol/vol001/RESTORETHIS 192.168.168.101:/CLU01V1/cvol001/RESTORETHIS
Ndmpcopy: Starting copy [ 4 ] ...
Ndmpcopy: 192.168.168.70: Notify: Connection established
Ndmpcopy: 192.168.168.101: Notify: Connection established
Ndmpcopy: 192.168.168.70: Connect: Authentication successful
Ndmpcopy: 192.168.168.101: Connect: Authentication successful
Ndmpcopy: 192.168.168.70: Log: DUMP: creating "/vol/vol001/../snapshot_for_backup.2" snapshot.
Ndmpcopy: 192.168.168.70: Log: DUMP: Using subtree dump
Ndmpcopy: 192.168.168.70: Log: DUMP: Date of this level 0 dump: Fri Apr  3 14:25:43 2015.
Ndmpcopy: 192.168.168.70: Log: DUMP: Date of last level 0 dump: the epoch.
Ndmpcopy: 192.168.168.70: Log: DUMP: Dumping /vol/vol001/RESTORETHIS to NDMP connection
Ndmpcopy: 192.168.168.70: Log: DUMP: mapping (Pass I)[regular files]
Ndmpcopy: 192.168.168.70: Log: DUMP: mapping (Pass II)[directories]
Ndmpcopy: 192.168.168.70: Log: DUMP: estimated 17 KB.
Ndmpcopy: 192.168.168.70: Log: DUMP: dumping (Pass III) [directories]
Ndmpcopy: 192.168.168.70: Log: DUMP: dumping (Pass IV) [regular files]
Ndmpcopy: 192.168.168.70: Log: ACL_START is '32768'
Ndmpcopy: 192.168.168.70: Log: DUMP: dumping (Pass V) [ACLs]
Ndmpcopy: 192.168.168.70: Log: DUMP: 39 KB
Ndmpcopy: 192.168.168.70: Log: DUMP: DUMP IS DONE
Ndmpcopy: 192.168.168.70: Log: DUMP: Deleting "/vol/vol001/../snapshot_for_backup.2" snapshot.
Ndmpcopy: 192.168.168.101: Log: RESTORE: Fri Apr  3 14:25:52 2015: Begin level 0 restore
Ndmpcopy: 192.168.168.101: Log: RESTORE: Fri Apr  3 14:25:52 2015: Reading directories from the backup
Ndmpcopy: 192.168.168.70: Log: DUMP_DATE is '5723038439'
Ndmpcopy: 192.168.168.70: Notify: dump successful
Ndmpcopy: 192.168.168.101: Log: RESTORE: Fri Apr  3 14:25:53 2015: Creating files and directories.
Ndmpcopy: 192.168.168.101: Log: RESTORE: Fri Apr  3 14:25:53 2015: Writing data to files.
Ndmpcopy: 192.168.168.101: Log: RESTORE: RESTORE IS DONE
Ndmpcopy: 192.168.168.101: Notify: restore successful
Ndmpcopy: Transfer successful [ 0 hours, 0 minutes, 25 seconds ]
Ndmpcopy: Done
FAS01>

FURTHER READING:


Comments

  1. great stuff! Thanks so much Vidad. Actually the whole website is bookmarked here and great source for any ontap admin!

    ReplyDelete
  2. I don't know exactly how many hours you just saved me, but hours you did save me.

    Excellent post!

    ReplyDelete
  3. Thank you for the post. It is very useful.

    Does it work with any ONTAP version in 7-Mode

    ReplyDelete
    Replies
    1. Hello Raji, I can't answer with certainty, but I don't see why it wouldn't work for any 7.X/8.X version of 7-Mode. Cheers, VC

      Delete

Post a Comment