Unsolved
This post is more than 5 years old
1 Rookie
•
101 Posts
0
1319
July 3rd, 2009 03:00
Script for cloning volumes
Hi all,
I'm trying to develop a script for cloning some tapes from a VTL to a Tape Jukebox this is my layout:
Script for cloning:
- Generate full volumes not cloned (mminfo)
- Use full volumes list for cloning all ssid (nsrclone)
Script for deleting originals savesets:
- Generate list of volumes cloned (mminfo)
- Use cloned volumes list to mark those volumes as recycle (command??)
So my doubt is with the last step of reusing the tapes that are already cloned, what can i do? relabel those tapes?, delete those tapes?, mark those tapes as recycle changing the expire time?
Any ideas are welcome, thanks.
I'm trying to develop a script for cloning some tapes from a VTL to a Tape Jukebox this is my layout:
Script for cloning:
- Generate full volumes not cloned (mminfo)
- Use full volumes list for cloning all ssid (nsrclone)
Script for deleting originals savesets:
- Generate list of volumes cloned (mminfo)
- Use cloned volumes list to mark those volumes as recycle (command??)
So my doubt is with the last step of reusing the tapes that are already cloned, what can i do? relabel those tapes?, delete those tapes?, mark those tapes as recycle changing the expire time?
Any ideas are welcome, thanks.
No Events found!


bc9am
33 Posts
0
July 3rd, 2009 03:00
In terms of deleting the original savesets on the VTL, we just have a command that deletes any saveset/cloneid combination from the media db on the VTL that is older than 14 days (we like to keep a period of backups local for quick restores) and that have 2 'copies'. I don't think you can recycle a saveset on the VTL as this would also recycle the saveset on the real tape (they have the same ssid).
DavidHampson
2 Intern
•
1.1K Posts
0
July 3rd, 2009 04:00
We are doing something similar here - from necessity rather than design as data growth has meant we cannot keep the original as long as the tape clone - and our strategy has been to adjust the clone retention time for the VTL copy after a successful clone of that saveset. The advantage of this is that your VTL tapes may be expired but can still be recovered from until they are reused.
DavidHampson
2 Intern
•
1.1K Posts
0
July 3rd, 2009 04:00
To correct your last point you can set a different clone retention or recycle flag on a clone instance if you specify both the ssid and cloneid with the nsrmm command. There is some enhancement to this in Networker 7.5 so worth looking at upgrading to if you are going to be setting different retention periods etc on your clones.
tlemons1
1 Rookie
•
87 Posts
0
July 3rd, 2009 12:00
Just wanted to make sure you were aware that cloning enhancements was one of the major new features in NetWorker V7.5. Check them out in the Release Notes, if you weren't already aware of these.
Hope this helps.
tl
BGuevara
1 Rookie
•
101 Posts
0
July 16th, 2009 02:00
Thanks all for your replies.
vsemaska
194 Posts
1
July 16th, 2009 06:00
nsrmm -o recyclable -s -y
or you can try:
nsrjb -o recyclable -s -Y
When dealing with savesets with the same SSID, you have to also specify the clone ID.
nsrmm -S SSID/CloneID ...
Hope that helps.
BGuevara
1 Rookie
•
101 Posts
0
July 16th, 2009 07:00
DavidHampson
2 Intern
•
1.1K Posts
0
July 16th, 2009 07:00
DavidHampson
2 Intern
•
1.1K Posts
0
July 16th, 2009 07:00
until [[ $check_volume = $volume ]]
do
read check_volume
/usr/sbin/mminfo -q "volume=$check_volume,copies=2,clretent>3 weeks,savetime>1 week ago,ssretent<5 weeks" -r ssid,cloneid -xc" "|while read -r ssidinfo
do
set -- $ssidinfo # split the variable so we can query with the ssid in the next part
ssid=$1
cloneid=$2
ssidcloneid=$1/$2
if [ `/usr/sbin/mminfo -q location=$nsr_jukebox,ssid=$ssid,incomplete=false` ]
then
nsrmm -e "3 weeks" -S $ssidcloneid
fi
done
done < $volume_mono_list
We do make an assumption here that we are cloning last night's backup otherwise we will need to add some code to determine when the backup was made and what date your new clretent will be.