Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retention period between clones and master

Status
Not open for further replies.

ist69veritas

Programmer
May 21, 2002
3
DE
Hi,

We're using Networker 6.1 on solaris.
We're using one master pool to back up database weekly and then clone the cartridges.

The retention period is set as 12 months for the master pool, but since we do not want to populate the autochanger with a lot of cartridges, we tried to set the retention period as 3 months on the clone pool. However, we saw that the retention period for the master was reset to 3 months by networker.

My question is : Is it possible to have different retention periods for the master and clone pools for the same saveset?

Thanks all in advance ...
 
From what I have seen, no. Retention period applies to the ssid, not ssid/cloneid.
 
Correct - please see the nsrmm man page.
 
Yup, Legato has yet to make it possible to keep different retention times to same ssid, rather annoying at times.
The workaround is to find the tapes that hold the clones and label them, do not change them to recyclabel in the GUI as that will make the SSID's on the original also recyclabel.
U have to label the tapes to keep the original in the database.
 
Let me add that you also may change the volume label option to "recycle - manual".
This will prevent NW from relabeling the tape as well.
 
What I do is I keep my clones on site for 14 days and use a script to delete saveset id's in the clone pool that are older than the 14 day limit. This was the onsite clone is only kept for X days.

Sample ONLY
#!/usr/bin/ksh
# ################################################################################################
#AUTHOR: Ed Skolnik
#MODIFIED: 2003/003/04 EIS Created
#
# This script is used to free up clone saveset's and volumes
# We will be cloning the world and sending the orginal volumes offsite, Our SLA
# is such that we only will have the most current save sets on site (right now it's 14 days,
# but for the sake of it I am testing with a 30 day on site plan).
# This script will delete any clone from the media database based on the above. It will also
# mark any "Default Clone" pool tapes that have zero saveset as recycleable.
#
# 2003/06/13 EIS Run nsrim -X two times after saveset delete
# 2003/07/24 EIS Added chi-backup_free_recycle_ssid.ksh at the end of this script
# 2003/01/16 EIS Changed selection from savetime to sscomp
# savetime is client side date / time stamp
# sscomp is server side
# 2004/02/11 EIS Changed numberofdays= from 14 to days
# ################################################################################################
rcx=0
PID=$$
tmpfile=/tmp/$(basename $0)_tmpfile.${PID}
tmpvalidclonepool=/tmp/$(basename #0)_validclonepools.${PID}
tmpmessage=/tmp/$(basename $0)_message.${PID}
numberofdays=14
numberofdays=10
mailto=root
# ##############################################################################
ck_for_valid_clone_pool () {
good_pool='bad'
if [ -z $pool ]; then
return
fi
nsradmin -i - <<EOF | grep name: | tr -d \; | cut -d: -f2 > $tmpvalidclonepool
. type: nsr pool; pool type:Backup Clone
show name
print
EOF
while read valid_clone_pools; do
if [ "$pool" = "$valid_clone_pools" ]; then
echo "Good Clone pool $pool "
good_pool=ok
break
fi
done < $tmpvalidclonepool
return
}
#
ck_for_running_savegrp () {
CT=1
while [ `ps -ef|grep -c 'root .*savegrp'` -gt 1 ] ; do
if [ $CT -gt 10 ] ; then
echo "$(basename $0) Never started because backups were running all night! $(ps -ef|grep 'root .*savegrp' ) " > $tmpdisplay_message
display_message A
exit 69
fi
sleep 900
CT=`expr $CT + 1`
done
}
display_message () {
case $1 in
A|a) message_level="ALERT";;
I|i) message_level="INFORMATION";;
W|w) message_level="WARNING";;
*) message_level="";;
esac
if [ -r $tmpmessage -a -w $tmpmessage ]; then
:
else
echo "$(basename $0) Error in calling display_message function "
exit 69
fi
mailx -s"$message_level $(basename $0) $(uname -n) $message_level " $mailto < $tmpmessage
cat $tmpmessage
rm $tmpmessage
}
# ##############################################################################
# Main Line Starts Here #
# ###############################################################################
. /.profile
#
pool="$1"
#
# Verify the pool specified is really a Clone pool
ck_for_valid_clone_pool
if [ "$good_pool" = "bad" ]; then
echo "Invalid Clone pool Specified $pool " > $tmpmessage
echo "Script Terminated " >> $tmpmessage
display_message W
return
fi
#
# Verify no save Groups are Running
#ck_for_running_savegrp
#
# Select clone pool entries
mminfo -a -ot -q"!manual,volaccess<5 days ago,pool=$pool,sscomp<$numberofdays days ago" -r'ssid,cloneid,volume(6),client,savetime(19),pool' > $tmpfile
#
# Delete Clone (savesetid/cloneid) from the Media database and Client file Index
#
if [ -s $tmpfile ]; then
echo "Total Clone savesets to purge is $(wc -l $tmpfile) "
echo "Deleting Clone save sets from Media Database "
echo " "
while read ssid cloneid volume dummy; do
echo ".\c"
if [ "$ssid" = "ssid" ]; then
:
else
nsrmm -d -v -y -S${ssid}/${cloneid}
if [ $? -ne 0 ]; then
echo " Error nsrmm -d -v -y -S${ssid}/${cloneid} "
echo "Will try again in 10 sec "
sleep 10
nsrmm -d -v -y -S${ssid}/${cloneid}
if [ $? -ne 0 ]; then
echo " Error nsrmm -d -v -y -S${ssid}/${cloneid} "
echo "Will try one more time in 10 sec"
sleep 10
nsrmm -d -v -y -S${ssid}/${cloneid}
fi
fi
fi
done < $tmpfile
# Mark the Original saveset as Not-Suspect
echo " "
echo "Marking Orginal save set -if no more clones exist- to notsuspect"
while read ssid dummy; do
echo "_\c"
if [ "$ssid" = "ssid" ]; then
continue
fi
mminfo -q"ssid=$ssid,copies=1" -r'ssid,cloneid,client,pool,copies' 1>/dev/null 2>&1
if [ $? -eq 0 ]; then
nsrmm -onotsuspect -v -y -S${ssid}
fi
done < $tmpfile
fi
echo "Run nsrim -X two times"
nsrim -X 1>/dev/null 2>&1
echo ...
nsrim -X 1>/dev/null 2>&1
# Flag any of the specified Clone pool volumes as recycleable if there are
# no savesets on the volumes
#
echo "Recycling Clone volumes with zero savesets"
mminfo -a -q"!manual,!volrecycle,pool=$pool" -r'volume,savesets' | while read volume savesets; do
if [ "$volume" = "volume" ]; then
:
else
if [ $savesets -eq 0 ]; then
echo " nsrmm -y -orecyclable $volume "
nsrmm -y -onotreadonly $volume
nsrmm -y -orecyclable $volume
fi
fi
done
rm $tmpfile

exit 0
# ######################################### End Of Script #####################


Ed Skolnik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top