02-28-2017 06:28 AM
Hello,
I'm trying to back up an Oracle database using a script-based policy, but I'm a little fuzzy on how to schedule the thing.
If I want to fire off a backup using a schedule, then I create a shcedule using 'Full', and the script dutifully begins at the moment requested, but when it starts to come back it's using the Default-Application-Backup schedule, and so it just writes wherever it wants with the retention period it wants.
If I want a backup to be initiated by the netbackup, do I need to create an Application Policy schedule for each of my other schedules so I can aplly the right SLP?
Thanks,
Tom
Solved! Go to Solution.
02-28-2017 06:37 AM
The basic scripts come with netbackup.
My unix scripts are two pieces, a *.sh and a *.rcv
The policy backup selection is the path to the .sh script, it calls the appropriate .rcv script.
For schedules, yes there should be two:
I name the Full backup "Parent.Job" and the Application backup "Child.Job"
The child should be set to run 24/7, the parent should have the actual schedule.
Using standard naming allows filtering for parents, or using the backup_exit_notify to ignore child jobs and alert on parents only.
02-28-2017 06:37 AM
The basic scripts come with netbackup.
My unix scripts are two pieces, a *.sh and a *.rcv
The policy backup selection is the path to the .sh script, it calls the appropriate .rcv script.
For schedules, yes there should be two:
I name the Full backup "Parent.Job" and the Application backup "Child.Job"
The child should be set to run 24/7, the parent should have the actual schedule.
Using standard naming allows filtering for parents, or using the backup_exit_notify to ignore child jobs and alert on parents only.
02-28-2017 06:38 AM
02-28-2017 06:42 AM
Thanks Genericus for the fast response, the parent-child thing seems to be the way forward. I'll try to get that set up soon. We use different SLPs based off what sort of backup it is, so I need to keep it at the schedule level...daily gets replicated to another appliance, but weekly goes to a tape for rotation too, that sort of thing.
What's an .rcv file? Is it something to control an RMAN process?
02-28-2017 06:55 AM
The scripts that come with NetBackup run through a check for full or incremental, then call an .rcv file, the rcv file has the actual backup
Here is one of my rcv files - sets 4 child and calls the policy and client name ( it is archivelogs )
connect target rcat/rcat@ORAPD
run {
# Hot database level 0 whole backup
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
allocate channel t3 type 'SBT_TAPE';
allocate channel t4 type 'SBT_TAPE';
send 'NB_ORA_POLICY=RMAN.ORAPD_ARCH.PROD, NB_ORA_CLIENT=orapd-backup';
sql 'alter system archive log current';
# backup all archive logs
backup
skip inaccessible
filesperset 3
format 'al_%s_%p_%t'
archivelog all delete input;
# Backup current control file
backup format 'cf_%d_%s_%p_%t' current controlfile;
}
run {
backup
current controlfile FORMAT '/ORAPD/opt/app/oracle/control/cf_%d_%s_%p_%t';
}
02-28-2017 08:12 AM
Why not using Netbackup Intelligent policies for Oracle ?
02-28-2017 09:12 AM - edited 03-01-2017 02:01 AM
My DBAs have a very strong views on tagging etc and want to keep 100% oversight of everything relating to their databases. The Intelligent Policy was tried and worked quite well, but didn't meet with their approval.