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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Got a script to check if Legato has backed up a list of file(s)?

Status
Not open for further replies.

JimTaylor

IS-IT--Management
Mar 19, 2001
20
US
Our dbas have asked for a way other that nwrecover gui to determine if log files have been backed up? I think this would be possible with a script using the recover command, but wondered if someone had already scripted same. If you have scripted same, please provide.
 
Yes it's possible. I don't have it scripted as such, but that's the easy part.

First, find the save set ids that you want to look at. For that ssid, do a "mminfo -r nsavetime -q ssid=${SSID}", you'll get back a timestamp. Feed that timestamp to "nsrinfo -t ${TIMESTAMP} ${CLIENT}", that will produce a list of files in that saveset.

nsrinfo produces output in a somewhat mangled fashion, but I'm not aware of any other method.
 
The dbas don't know the saveset is, does nsrinfo require? Maybe, I'll look into nsrinfo further. Thanks for referral.

They just have a list of files they want to delete (reduce size of fulls) if hathey ve been backed up. I just sent them link to saveset reports, that might meet their needs given exceptions are noted. There is probably a number of ways to address this issue, but they asked for a way to determine if a specific file(s) have been backed up.
 
Thanks, nsrinfo will give them another option except for those privledge restrictions. They liked the saveset reports too. Just hope they don't make too many assumptions with saveset reports.
 
Another approach would be to set this particular client to verbose. Then all files being backed up will be written to the daemon.log.

From the daemon.log it should be fairly easy with grep and awk to extract the information.

But be aware that your daemon.log will grow faster than usual.

Johanes
 
You can make this with a script.

Precommand:
ls /dir_log_files > work_file


/usr/sbin/nsr/save ..........

Postcommand:
if status=succeeded then
cat work_file | while read file_log
do
rm file_log
done
fi


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top