2011-09-27 08:29 AM
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
2011-10-04 06:42 AM
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
sdclisnap mount -k f -s %1 -d l
sdclisnap mount -k g -s %2 -d m
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
sdclisnap unmount -d l -f
sdclisnap unmount -d m -f
===================== Script End ==============================
2011-10-04 11:13 AM
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.
2011-10-05 06:00 AM
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.