Data Backup and Recovery

sdcli dataset resource pool

c_morrall
5,385 Views

I'm implementing a scripted solution aiming to handle backups of SAN attached hosts running Windows. There are a number of sample scripts out there, but I'd like to integrate this with Protection Manager for error reporting and simplified management. I'm quite aware I need to schedule local snapshots through snapdrive, I won't be able to schedule backups from PM since they would be controller based and thus inconsistent.

The "sdcli dataset" command set is showing a fair bit of promise, despite the deafening lack of documentation. I've done an empirical study of many of the available sub commands and have arrived at a solution that will:

Create a new dataset for each new physical host.

Populate the dataset with all available mount points. This will lead to the automatic creation of relevant snapvault relationships.

Register a new backup version in Protection Manager

Take local (consistent) snapshots of all mountpoints.

Transfer the snapshots to the snapvault location.

Close the backup version and ending the backup job.

Have Protection Manager handle retention of both primary and secondary snapshots (This I need to verify when the retention period is over).

There's really only one thing missing. When I create a new dataset, I can apply a policy from the sdcli command line, but I've not been able to find out how to add a resource pool to the dataset. If I can't, the handling is a bit clumsy. The new dataset is created, and then the operator has to be notified to add a resource pool. I suppose I could work a bit with the dfpm dataset command options from the DFM server itself, but I'd rather avoid having to open up for remote commands from every physical host and it's dog to the DFM server. This is a highly segmented network with several firewalls.

Any insight on this? Just this bit missing, and then I'd be happy.

8 REPLIES 8

s_pellegrino
5,385 Views

Hi,

I just started getting interested in the same things. Amazing disappointment about this undocumented command: sdcli dataset

Anyway, i'm kinda struggling with the "backup version" number. How did you parse and collect this number in your scripts ?

Regards

s_pellegrino
5,385 Views

Hi there,

Unfortunatly there is no documentation about the "sdcli dataset" commands

I am not a netapp guru but here is my method to make this work. Test before implementing.

If you have any suggestion or feedback, i'd be glad to hear it

1. First step is to create an applicative dataset using sdcli dataset  so it looks something good like snapmanager:

sdcli dataset create -dn SnapDrv_SERVERNAME -as SERVERNAME -an "SnapDrive for Windows" -av "v6.3" -dd "description"

2. Add members, it means tell snapdrive to add the lun associated to this mount point into the dataset. Here my LUN are connected as E and F

sdcli add_members -dn SnapDrv_SERVERNAME -AP E:\ mp F:\ mp

3. Go to operation manager and give a protection policy to your dataset

4. Now operation manager and snapdrive can talk together and you have to schedule a backup script on your server

Here is my powershell script using snapdrive sdcli dataset command

This script allows consistent LUN snapshot using snapdrive and writes backup versions to Operation Manager

Then dataset retention and protection policy applies

It only works for filesystem consitency, DO NOT use this if you have some kind of databases or applications working on it

*******************************************************************
$hostname = hostname
$outputfile = "c:\temp\output.txt"
$datasetname = "SnapDrv_XXX"
$jobname = ""
$jobdescription = "Daily Backup"
$jobretention = "daily"
$date = get-date -uformat %Y-%M-%d_%H%M%Z
$snapshotname = $date + "00_SnapDrv_XXX_" + $jobretention
$AP1 = "F:\"
$AP2 = "M:\"

sdcli dataset backup_start -dn $datasetname -desd $jobdescription -rt $jobretention > $outputfile
Get-Content $outputfile | select-string -pattern ":" | foreach {$_.line -match "\d+"}
$backupversion = $matches[0]


sdcli dataset create_local_backup -dn $datasetname -bv $backupversion -SL $snapshotname $AP1

sdcli dataset create_local_backup -dn $datasetname -bv $backupversion -SL $snapshotname $AP2


sdcli dataset transfer_now -dn $datasetname -rt $jobretention
sdcli dataset backup_end -dn $datasetname -bv $backupversion

kjag
5,385 Views

Hi,

This looks fine. Just wanted to update the command to use incase of restores.

sdcli dataset restore -dn <DS name> -bv <Bakcup version> -AP F:\ mp

-KJag

dennis_hagist
5,385 Views

Hi,

i've tried to create an local-backup of my LUNs.

If I run the following command:

sdcli dataset create_local_backup -dn SnapDrv_Server -bv 1342606105 -SL test2 C:\MountPoint\LUN01\

it works fine.

The problem occours, when I try to backup more than one LUN on one Volume.

sdcli dataset create_local_backup -dn SnapDrv_Server -bv 1342606105 -SL test3 C:\MountPoint\LUN01\ test3 C:\MountPoint\LUN02\

Here is the output:

     SnapshotCopyName:test3  AccessPoint:C:\MountPoint\LUN01\

     SnapshotCopyName:test3  AccessPoint:C:\MountPoint\LUN02\

     SDDatasetBackupSnapshotCreate failed ...

      Fault:An attempt to create snapshot(test3) for dataset(SnapDrv_Server) failed.

     The operation completed successfully.

In the eventlog is an entry, that sdcli can not create an backup because the snapshot already exist.

How can I run an backup of more than one LUNs on one volume?

sdcli snap create -s test -D C:\MountPoint\LUN01\ C:\MountPoint\LUN02\

works fine for both LUNs in one SnapShot, but this command does not connect to the DFM-Server.

vemery999
5,385 Views

Hi,

I'm very interesting about this post. I'm experiencing the same situation about inconsitent snapshot in SnapDrive, because scheduled from PM.

I have a windows files server with boot on SAN Netapp lun, and another mapped lun for file sharing. SnapDrive 6.3 is installed on this server and worked fine for provsionning, connect/disconnect/resize lun/disk....

I have also OnCommand 5 installed at a remote secondary location (another active directory domain), with secondary FAS for my snapvault relatioships.The dataset was created from PM and schedule policy is applied to this dataset. The job work fine. SnapDrive detect the snapshot, but they appear inconsistant. Is because PM "discuss" directely with primary FAS and PM is not aware of the installation of snapdrive? or it's a missconfiguration issue ? I added the DFM server/credential during the installation of snapdrive on my file server.

When I expend snapshot copie of my LUNs in snapdrive, I can see the primary and secondary snapshots, so snapdrive seems to be aware of the snapvault relatioship and the secondary FAS.

What about RBAC? Do I need implement RBAC because of the separate active directory domain ? It's a user right issue?

How can I do consistent snapshot from Oncommand without script, but directly from PM ?

Thanks

Vincent

kjag
5,385 Views

Hi,

You need to create the dataset using SnapDrive commands, rather than creating the same in Protection Manager.

As mentioned in the above post, you can use the below command to create the dataset.

>> 1. First step is to create an applicative dataset using sdcli dataset  so it looks something good like snapmanager:

>> sdcli dataset create -dn SnapDrv_SERVERNAME -as SERVERNAME -an "SnapDrive for Windows" -av "v6.3" -dd "description"

>> 2. Add members, it means tell snapdrive to add the lun associated to this mount point into the dataset. Here my LUN are connected as E and F

>> sdcli add_members -dn SnapDrv_SERVERNAME -AP E:\ mp F:\ mp

Once above steps are completed, then you can go to protection manager to assign the protection policy.

>> How can I do consistent snapshot from Oncommand without script, but directly from PM ?

If you do not want to use scripts, then you have to follow the steps mentioned in the above post. i.e creating the dataset using SnapDrive...

-KJag

rvhoutem
5,385 Views

Hi,

I used your script. It is working fine, but how about the retention of the primary snapshots.

Oncommand (dataset) doesn't delete the primary snapshots created by snapdrive?

mmodi
5,385 Views

DFM has 2 types of datasets -

  • Physical (created from within DFM using NMC of dfpm cli)
  • Application (created from an external app like snapdrive)

The retention and replication of snapshots created from an external application like SnapDrive/SnapManager is not managed by DFPM (Protection Manager).

We have 2 options -

=== Option 1 (Using a scli script scheduled on the local host)

Example : Creating consistent snapshots using Snap Drive for drive “E:\”

sdcli.exe snap delete -m <hostname> -d e -s sd_daily.7

sdcli.exe snap rename -m <hostname> -d e -o sd_daily.6 -n sd_daily.7

sdcli.exe snap rename -m <hostname> -d e -o sd_daily.5 -n sd_daily.6

sdcli.exe snap rename -m <hostname> -d e -o sd_daily.4 -n sd_daily.5

sdcli.exe snap rename -m <hostname> -d e -o sd_daily.3 -n sd_daily.4

sdcli.exe snap rename -m <hostname> -d e -o sd_daily.2 -n sd_daily.3

sdcli.exe snap rename -m <hostname> -d e -o sd_daily.1 -n sd_daily.2

sdcli.exe snap rename -m <hostname> -d e -o sd_daily.0 -n sd_daily.1

sdcli.exe snap create -m <hostname> -s sd_daily.0 -D e

=== Option 2 (Using Snap Creator integration)

Snap Creator as an external application has the ability to create datasets and manage retention.

Another confusing option would be to leverage sdcli script above in addition to Snap Creator "External snap" option within the profile to register snapshots to the dataset which then allows for dfpm to manage retention.

Public