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

Local Directives 1

Status
Not open for further replies.

esserc

Technical User
Sep 25, 2001
54
US
I use local directives quite a bit. I find it more useful than defining a directive on the server if the directive is just for one machine. I mainly use them for databases, so the files (excluding the database) are backed up in one savegroup. Then the database is backed up later using a Business Module. The local directive keeps the open database files from being backed up with the other files. This works just fine.

Now my question. There are times where I want to bring down the database and do a full filesystem backup of the entire machine (including the database files). Is there a way to override local directives?
 
You can do this by doing the following.

Add a new group called Say "FULL DB" or use existing
Add a client with the same name say "SUNDB01"
Add add it to the new full group or old.
(this can be done no problems)
Add normal directives say Unix standard directives.
Add in the "backup command" under the client setup "savepnpc"

Do a test backup and stop it.
This will now have created a {GROUPNAME}.res file under /nsr/res

In this file you can add commands to shutdown your database and start it before and after the backups.

Here is an example.

type: savepnpc;
precmd: "/bin/su - oracle -c /u01/app/ldba/bin/stopora";
pstcmd: "/bin/su - oracle -c /u01/app/ldba/bin/startora";
timeout: "07:00:00";

I created scripts to shutdown and startup the service.

If you need these post it.

Hope this helped

Remember you can have a client name configured as many times as you like just select a different group or directives.
 
Thank you for the answer, but that wasn't my question. Maybe I need to explain it a little better.

I already use savepnpc for shuting down the starting the database on the rare cases that I do a cold backup. That's not the problem. The problem is that I use local directives on the systems with databases to prevent networker from trying to save the datafiles on the nightly filesystem backup. In other words, I put a .nsr file in the directory above the one I want to skip that says "+skip: *". This way the module is the only thing trying to backup my databases.

The problem comes when I really *do* want every file backed up. The only way I know to do it now, is to manually remove all the .nsr files before I start the backup. Is there a global directive I can put in that tells it to skip local directives?
 
You could define another Directive - the same as, say "Unix standard directive" and just add a
Code:
<< / >>
  ignore 
[\code]
This will ignore all the .nsr files in subsequent directories.

Hope this helps

Johanes
 
Thanks, that really helps. I wish someone would write a good FAQ about directives. It's not really covered in the manual very well.
 
One thing to exclude directories - regardless of where they are is to define a directive with
Code:
<< / >>
  +skip: DIRNAME
[\code]
This will exclude everything below this path named DIRNAME.
One problem still exists - if there is anything you want to have backed up with the same name - it wont get backed up :-(
This way we do our filesystem saves on machines with oracle databases - DIRNAME is oradata, so everything below oradata is skipped.
That helps if you have DBAs updating their systems rather frequently.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top