Data Backup and Recovery

SMO 3.4.1 on AIX + postscript - Snapvault not working.

partsys
3,020 Views

Hello at all,

I need to use SMO on AIX Server because SnapCenter for Oracle don't use on AIX Server when the Netapp cluster are on Ontap 9.

 

I'm actually on AFF MetroCluster (Ontap 9.4) and I need to create a backup of Oracle with SMO.

 

I don't have a problem to backup my Oracle base with SMO.

 

But I don't find how to set SMO to create a snapshot with snapmirror_label and after, make a snapvault with SMO.

When I see the documentation, in Ontap 9.x, a script is possible.

Netap specify that I must create a postscript XML file like that : 

 
<preposttask-specification xmlns="http://www.netapp.com">
            <task-specification>
             <post-tasks>
                 <task>
                    <name>Vault the backup for cDOT</name>
                     <description>vaulting the backup for cDOT volume</description>
                     <parameter>
                     <name>SECONDARY_ENTITIES</name>
                     <value>NOM_SVM_DEST.dns_name:vol_cntrl, NOM_SVM_DEST.dns_name:vol_data, NOM_SVM_DEST.dns_name:vol_arch</value>
                     <name>SNAPSHOT_LABEL</name>
                     <value>daily</value>
                     </parameter>
                 </task>
             <post-tasks>
             </task-specification>
             </preposttask-specification>

 

But after, Netapp specify that I must use this information : 

=======

name="Vault the backup for cDOT"
description="Vaulting the backup for cDOT volume"
context=
timeout="0"
 
#User has to provide the values for these parameters while creating a backup in Backup Task Specification page of the Backup wizard.
parameter=("SECONDARY_ENTITIES            :Secondary Storage Name with volume name"
           "SNAPSHOT_LABEL                              :Label Name to be set for snapshots before doing the vault update")
 
EXIT=0
 
function _exit {
     
      rc=$1
 
      echo "Command complete."
     
      exit $rc
}
 
function usage {
                echo "usage: $(basename $0) { -check | -describe | -execute }"
                _exit 99
}
 
function describe {
                echo "SM_PI_NAME:$name"
                echo "SM_PI_DESCRIPTION:$description"
                echo "SM_PI_TIMEOUT:$timeout"
                IFS=^
                for entry in ${parameter[@]}; do
                               echo "SM_PI_PARAMETER:$entry"
                done
 
                _exit 0
}
 
function check {
                _exit 0
}
#Split the comma-separated volumes and mirror the volumes one-by-one.
function execute {
 
     echo "execute started"
 
     echo SNAPSHOT LABEL : $SNAPSHOT_LABEL
 
 
     echo $SM_SNAPDRIVE_HOME/bin/snapdrive snap setlabel -snaplabel $SNAPSHOT_LABEL -snapname $SM_PRIMARY_FULL_SNAPSHOT_NAME_FOR_TAG
 
 
     $SM_SNAPDRIVE_HOME/bin/snapdrive snap setlabel -snaplabel $SNAPSHOT_LABEL -snapname $SM_PRIMARY_FULL_SNAPSHOT_NAME_FOR_TAG
     if [ $? -ne 0 ]; then
        $SM_SNAPDRIVE_HOME/bin/snapdrive snap resetlabel -snapname $SM_PRIMARY_FULL_SNAPSHOT_NAME_FOR_TAG
        _exit 4
     fi
               
     echo SECONDARY_ENTITIES  : $SECONDARY_ENTITIES
     IFS=,
     for SECONDARY_ENTITY in ${SECONDARY_ENTITIES[@]}; do
     echo SECONDARY_ENTITY  : $SECONDARY_ENTITY
     $SM_SNAPDRIVE_HOME/bin/smsv snapmirror update $SECONDARY_ENTITY
     if [ $? -ne 0 ] ; then
    
     _exit 4
     fi
     done
     echo "execute ended"
 
    _exit 0
 
 
}
 
case $(echo $1 | tr [A-Z] [a-z]) in
                -check)    check
                           ;;
                -execute)  execute
                           ;;
                -describe) describe
                           ;;
                *)         echo "unknown option $1"
                           usage
                           ;; 
esac
============
I don't know if I must write this second information in the same script.
 
In the second problem, I see that the script use the "snapdrive snap setlabel -snaplabel $SNAPSHOT_LABEL -snapname $SM_PRIMARY_FULL_SNAPSHOT_NAME_FOR_TAG" command.
 
When I use this command on SnapDrive for AIX, when I create a snapshot, I don't see the Snapmirror_label on the snapshot .
 
Thank's you for your help. 
 Herve
4 REPLIES 4

stanton
2,967 Views

In SMO 3.4.1 a post script was no longer needed.  You can choose the vault or mirror from the retention screen in the profile.  It's easier than getting the post scripts working.

partsys
2,948 Views

Hi Santon, 

can you explain to me where to go? Or what to do?


@stanton wrote:

In SMO 3.4.1 a post script was no longer needed.  You can choose the vault or mirror from the retention screen in the profile.  It's easier than getting the post scripts working.


 

stanton
2,844 Views

Start in the Installation guide for Clustered ONTAP: https://library.netapp.com/ecmdocs/ECMP12471543/html/frameset.html

 

partsys
2,837 Views

stanton, sorry but I already read the documentation and unless I'm wrong, but the solution is not provided in the documentation. 

 

 

Public