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

MS SQL Servers via NetWorker

Status
Not open for further replies.

mantab888

MIS
Nov 26, 2001
69
US
I am trying to script a backup command that issues a db shutdown on our SQL database files, runs the backup, and finally restarts the db from within the legato client. I believe that legato easily allows scripts to be run for an individual client – or has this been changed? Does anybody have the procedure for this handy? Please let me know if you require additional information.

Thanks in advance,

mantab888
 

I think you want to use savepnpc.

1) Edit the client resource, add "savepnpc" in the backup
command field.
2) Run a small backup, c:\tmp for instance
3) In the ..\nsr\res dir on the client you will have a file
called groupname.res, i.e if the client is in group
Default the file will be called Default.res. It will look
like this:

type: savepnpc;
precmd: "echo hello";
pstcmd: "echo bye";
timeout: "12:00:00";
abort precmd with group: No;

precmd is what you want to perform before the backup starts, i.e "net stop sql agent" or something. pstcmd is what you want to perform after the backup is finished, i.e start the services again. That´s it, backup will start after precmd has finished. You can ofcourse point to a .bat file or something, but make sure that the .bat script sends a correct exit signal upon completion, so that savepnpc will know when it´s finished.

Cheers!
MAverick
 
Thanks NWNinja,

I'll give this a shot and let you know how it goes!

mantab888
 
Another good solution is take a dump from database and use incremental backup to collect the dump to the tape/disk. This solution means no downtime and you don't have to hassle with scripts. Most of our customers have bought the MSSQL module as it is pretty cheap.

Savepnpc scripts in windows environments are IMHO unreliable especially if commands will need different users to complete. In our environments backups have their own user with limited rights.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top