ONTAP Discussions

Snapmanager for SQl 5.1 need to mount snapshot for backup

tsdickson
2,130 Views

We are new to snapmanager and hoping to get some help. We have snapmanager for sql 5.1 installed with snapdrive 6.3. We run snapshots of out Db's every hour and snapmirror to our dr site. We want to create a script that will mount the most recent snapshot then the backup will run and after the backup unmount the snapshot.

We are going to use Veritas backup exec 11 (but plan to updated to 2010). Eventually we will be using commvault, but it is down the road a little bit but would like the script to work with whatever backup software we use.

This is what we suspect we need to do.

List the snap shots from the volumes we want to mount

from that list mount the most recent snapshots.

allow the backup to run

unmount the snap shot.

Any advice is greatly appreciated or we are more than happy to run scripts that have already been written. We do not need to recreate the wheel

3 REPLIES 3

patrik_gross
2,130 Views

Hello,

so you need a scipt like this here:

Script:: backup-snap.cmd Parameter: $SqlSnapshot $InfoSnapshot

===================== Script Begin ==============================

REM Mount a LUN backed by the Snapshot copy

REM database as drive letter k:\ to m:\. k=database, l=logs,m=snapinfo

sdclisnap mount -k i -s %1 -d k

sleep5

sdclisnap mount -k f -s %1 -d l

sleep5

sdclisnap mount -k g -s %2 -d m

sleep5

REM Use BackupExecClient to back up the database files and Logs.

backupexecclient everthing under "K:\MSSQL\*"

backupexecclient everthing under"L:\MSSQL\*"

backupexecclient everthing under"M:\SMSQL_SnapInfo\*"

REM Dismount the Snapshot copy mounted as drive letter K:\ to M:\.

REM The below example is shown with an optional parameter (-f)

REM to forcefully disconnect the drive letter.

sdclisnap unmount -d k -f

sleep5

sdclisnap unmount -d l -f

sleep5

sdclisnap unmount -d m -f

sleep5

===================== Script End ==============================

//Patrik

tsdickson
2,130 Views

Thank you for your reply Patrick.

We are currently working on the script as well.

We found that we can easily find the most recent snapshots (db,logs,and snapinfo). We will then rename the snapshot and then mount the snapshots. We will then backup the data using backup exec remote agent. The reason for the rename is the the next snapshot will be taken prior to out backup finishing and we do not want to cause any issues with the new snapshot being taken. After the backup competes we unmount the snapshots and rename them to match what snapinfo thinks they should be.

patrik_gross
2,130 Views

But this is done automaticly when you use the "Run Command After Backup" feature. This event is triggered when the verification process is finished successfuly.

Public