Data ONTAP Discussions

integrating snapvault with script

Hello Friends,

I have a snapvault query for taking a backup of an application without snap creator or using any other snap manager product. So I decided to integrate the backup with a script when the Database will be shut down.

If you have some spare  time to read this please  enlighten me with some idea.

I am in the need to take a backup of a Oracle Database without the help of any snap manager or snap creator product.

So I proposed an idea like this,

1.      1. Stop the application and run snapvault baseline for the Data base volumes and other volumes related to the DB (snapvault start –S)

2.     2. I have chosen one destination volume for all the qtrees (4 in total) to be snapvaulted. In short 4 qtrees are baselined to one snapvault destination volume.

The relation is as below:

snapvault start -S sqn_fas6210_drt:/vol/vol_MDM_WDS1/Qantmdmwds1_dat1 /vol/MDM_COLDBACKUP_DRT/Qantmdmwds1_dat1

snapvault start -S sqn_fas6210_drt:/vol/vol_MDM_WDS1/Qantmdmwds1_dat2 /vol/MDM_COLDBACKUP_DRT/Qantmdmwds1_dat2

snapvault start -S sqn_fas6210_drt:/vol/vol_MDM_WDS1/Qantmdmwds1_dat3 /vol/MDM_COLDBACKUP_DRT/Qantmdmwds1_dat3

snapvault start -S sqn_fas6210_drt:/vol/vol_X86_OS_DRT/Qantmdmwds1_OS /vol/MDM_COLDBACKUP_DRT/Qantmdmwds1_OS

After the baseline was created a snapvault base snapshot got created for each qtree on the primary volume.

[root@sqnbkp12 backup]# ssh snap list vol_MDM_WDS1

Volume vol_MDM_WDS1

  1. working...

  %/used       %/total  date          name

----------  ----------  ------------  --------

  0% ( 0%)    0% ( 0%)  Apr 19 11:40  sqn-fas2040-cb-par3(0142228367)_MDM_COLDBACKUP_DRT_Qantmdmwds1_dat3-src.1 (snapvault)

  0% ( 0%)    0% ( 0%)  Apr 19 11:40  sqn-fas2040-cb-par3(0142228367)_MDM_COLDBACKUP_DRT_Qantmdmwds1_dat2-src.1 (snapvault)

  0% ( 0%)    0% ( 0%)  Apr 19 11:40  sqn-fas2040-cb-par3(0142228367)_MDM_COLDBACKUP_DRT_Qantmdmwds1_dat1-src.1 (snapvault)

On the secondary I have one baseline snapshot (for all the primary qtrees )

[root@sqnbkp12 backup]# ssh snap list MDM_COLDBACKUP_DRT


  1. working...

  %/used       %/total  date          name

----------  ----------  ------------  --------

  0% ( 0%)    0% ( 0%)  Apr 19 11:49  sqn-fas2040-cb-par3(0142228367)_MDM_COLDBACKUP_DRT-base.8 (busy,snapvault)


Is there any way by which I can have individual snapshot created during each SV update instead of the same base snapshot getting update. For instance, I ran an update today and here you see the base SV snapshot getting updated instead of a new snapshot getting created.


  1. working...

  %/used       %/total  date          name

----------  ----------  ------------  --------

  0% ( 0%)    0% ( 0%)  Apr 19 11:49  sqn-fas2040-cb-par3(0142228367)_MDM_COLDBACKUP_DRT-base.8 (busy,snapvault)

1.       3.Now I wanted the snapvault update to integrate in a script. The Update would happen once the DB will be shut down once a week. So the task is evened out between DBA’s and storage guys that firist DBA should shut down the script and then storage admin will fire a script which will update the snapvault relation.

2.      4. It worked fine, it did an update for the relation, but it didn’t create a separate snapshot (like sv_weekly),  on the secondary, instead it updated the same baseline snapvault snapshot on the secondary. This makes my job of restoration difficult, if someone asks me to restore last week’s backup data. I won’t be able to fulfill the restore as the base snapshot (which got created during sv initialization ) last week got updated during an SV update this week. Which means I cannot data present in last week’s backup/snapshot.

3.      5. I wanted to have named snapshots like sv_weekly.0, sv_weekly.1 with each snapvault update . For this I created a snapvault sched as well

                       [root@sqnbkp12 backup]# ssh snapvault snap sched MDM_COLDBACKUP_DRT  

             xfer   MDM_COLDBACKUP_DRT sv_weekly 15@- preserve=default,warn=0

Can you suggest me any solution by which I can achieve that? Or is my approach wrong?

Mant Thanks



Re: integrating snapvault with script


Any ideas from any snapvault and scripting gurus?



Re: integrating snapvault with script

Hi Rahul,

I am not a script guru but wat you can do get the instructions from your DBA or work with your DBA to pause ( I heard it will not have effect on the production ) the DB and then take a snapshot using command snap create for the particular volume which you want to vault and then initiate snapvault and once done use the command

snapvault update -w -s <snap-name> <secondary-path>  to have the snap update based on the snapshot what you have created

Needs to be done from secondary filer

snapname --> the snapshot what you have created

This is just an idea worth trying.