Selective Timed Staging
Jump to navigation
Jump to search
To stage savesets selectively - a script
Networker Management Console allows only limited numbers of parameters to be used in staging definition (watermarks, age, ...). Here we are focusing on means to discriminate savesets further in detail, based on particular origin (client) and date of creation, and clone only those. You may use it to free space from disk or tapes (any media).
- Should work with any OS with appropriate variables set right (only the bold lines are really used)
REM 1. with mminfo we prepare list of savesets to be cloned REM (selected are savesets that are in their original pool (InitialPool), from client (OurClient), and are more than 7 days old REM 2. list is saved to a file (C:\ssidvtl1.txt) REM you have to set 'pool', 'client', 'savetime' (age) and 'name' (saveset) variables according to need as well as name and location of a file that will contain saveset list REM of course you can use less or more variables, or use entirely different variables (see man mminfo) mminfo -q "pool=InitialPool,client=OurClient, savetime<7days ago,name=/save/set" -r ssid > C:\ssidvtl1.txt REM 3. here we instruct Networker to stage savesets whose ssid's are in a file to a Clone pool and log the activity to a file (C:\staging_log.txt) nsrstage -m -b DestinationClonePool -S -f C:\ssidvtl1.txt >> C:\staging_log.txt 2>&1
- Take care you supply full path info on files used in script or otherwise provide path info
- Schedule a job to your script (.bat) file
- If you get following info in your log ..
Successfully deleted original clone 1342605613 of save set 3305539895 from media database. Recovering space from volume 1358056466 failed with the error 'Space can only be recovered from adv_file and file type devices.'. Refer to the NetWorker log for details. 6365:nsrstage: Space can only be recovered from adv_file and file type devices.
.. its normal. If you want to free entire space on the tape in jukebox, take care all savesets are staged first (then relabel)
- If you already have multiple clones of saveset you are cloning, take care you are using ssid/cloneid format for saveset list generation as otherwise all other savesets will be deleted at the end of stage-ing process
- to confirm everything is working OK issue following
mminfo -q "client=OurClient, name=/save/set" -r sscreate, pool
PLEASE TEST THOROUGHLY BEFORE DEPLOYMENT