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

Clone Post Command

Status
Not open for further replies.

jessehc

IS-IT--Management
Jun 22, 2005
10
US
I am going to setup automatic cloning after my backup to disk process completes. After the clones are complete, I would like Legato to withdraw the tapes from the library to mailslots for removal. To do this, I will probably have to create a batch file that will accomplish this. Does anyone know how to run a command/batch file after clone completion? I know I can schedule a job do this at a certain time of day but I would rather have the clone process kick this off after completion.

Legato Networker 7.2 on Windows 2003 Server.

Thanks in advance
 
Hmm... That depends on how you start your cloning operation. I´m guessing you use the built-in feature? In that case, i don´t think is possible. However, if you use a script instead, (like a batch file) that you call using the Action attribute of the Savegroup Completion notification, you have much more control. You can in the script customize a mminfo command to pick out the ssid´s to clone, wait for the nsrclone command to finish, and at the end call a nsrjb -w command to withdraw the tapes. That´s just my suggestions, perhaps someone has a better one.

Good luck!
Cheers!
 
Thanks NWninja for the idea.

I have been using the savepnpc command to kick off backup jobs so I could use pre and post scripts to run net use commands. I guess I could use this command to start the backup job then kick off the clone job in a post batch file. After the clone completes, the next line in the batch file could export the tapes.

If I use the savepnpc command and start the clone job in the post batch file, I don't think Legato will be able to control the clone job since it would be started in a batch file. If I need to stop the clone job, I would not be able to. Any ideas how I could get around this probem?

Thanks
 
I too would not recommend starting the clone operation using savepnpc, since savepnpc is "per client", not "per group".
Using it in savepnpc will cause the first client that completes it´s backup to start cloning, locking the tape/file device for further clone (or any read) operations. So the second client that completes will not be able to run it´s clone job. It would be much easier to use the Savegoup Completion to kick of the cloning.

I don't really know of any good way to stop a clone/stage operation, other than killing the nsrclone/nsrstage process.
In any case, stopping a clone/stage operation is not recommended, since it will most likly leave the media db with incomplete entries.

Cheers!
 
Using the savegroup notification, is there a way to create a notification based on a specfic save group? I may want to run different scripts depending on the save group or I may not want to clone a specifc save group.
 
No, there´s no option to specify a different savegroup completion for each group, it runs for all groups.
But you don´t need to do that, since you can cutsomize your script to only do what you want it to do. If you only want to clone let´s say the Default group, you set a query in the mminfo command that only matches uncloned savesets from the Default group. It´s quite easy to do, below is just a small example. It will match only complete savesets, belonging to group Default, not cloned and with level full. If you are using Advanced file devices you will need to change copies=1 to copies=2, since a saveset on an advance file device has 2 copies if it has not been cloned (1 on RW and 1 on RO device).

mminfo -avr ssid -q "!incomplete,group=Default,copies=1,level=full"

Send the output to a textfile or to a variable, and then use the nsrclone command to clone the savesets in the file.

Cheers!
 
To create a group specific clone process, may i suggest that you just use a backup script as you can find it in the Admin Guide and that you insert the clone operation 'subscript' in the post-backup section.
 
605 - Are you talking about using the save command or the savepnpc command? I didn't like the save command because I could not stop the job if it was started from a batch file. At this point, I think I need a way for the save group completion to kick off a cloning script but I don't know how to pass in the save group that completed.

NWNinja - I think the mminfo command you gave me will work best. Do you know how I can get the group name that triggered the save group completion notification into my script? I guess I don't understand how and what the notification will pass info into my batch file.

Thanks
 
As you can specify the server along with nsrclone, you may also initiate the clone command from the client - savepnpc should work as well.

First step you have to run mminfo and find out all the save sets that have been created recently (by running this group). Pipe the output to a file. Then use nsrclone and read the file to instruct it about the save sets to be cloned.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top