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 :
<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