09-04-2014 01:05 PM
Hi everybody
I have in my Netbackup environment daily and weekly duplications. The daily duplications are ran manually but the weekly duplications run by bpduplicate scripts. Follow my actual script:
bpduplicate -dstunit 6drivesLTO4Prod -dp Datasafe -rl -1 -fail_on_error 0 -set_primary 0 -primary -number_copies 1 -mpx -L "D:\VERITAS\NetBackup\Logs\NBduplicate\Dup-FDS-1_mpx.log" -hoursago 36 -M bnpbkp1
Now i need to change my script to select specific policies that will be duplicated. I checked all the parameters to be used with bpduplicate and found the parameter -policy. It worked perfectly with ONE policy but i need to run for 20 policies. I can make one script per policy but its crucial that all duplicatation run inside only ONE job.
There is a way to do that?
Best Regards and Tks.! :)
Solved! Go to Solution.
09-05-2014 08:37 AM
Did you change the schedule name, run a backup and then run the script?
A backup run before you changed the schedule wil still have the old schedule name in its catalog entry.
09-04-2014 01:48 PM
Think you will have to use a BID (BackupID) file to make it one job.
I would use bpimagelist to find the Backupids to be put in the BID file and then run bpduplicate with the BID file
09-04-2014 03:25 PM
Hi Michael,
This script is setup in a windows task so if i need to run the bpimagelist manually the script will not be automatic either :(
09-04-2014 10:20 PM
bpduplicate has an option '-policy <name>'
I am curious about your reasons for having to do duplicates this way while NBU have various options to automate duplications:
NBU Vault
Storage Lifecycle Policies
Disk Staging
09-04-2014 11:58 PM
My thought was exactly the same. While bpduplicate was the tool to use in NBU 4 & 5 - NBU 6 introduced Storage LifeCycle Policies that handle all that for you.
Best practices for using Storage Lifecycle Policies and Auto Image Replication in NetBackup 7.6
http://www.symantec.com/docs/TECH208536
The learning curve for SLP can be a little steep until you get the concept. But trust me - you will love SLP's
09-05-2014 04:26 AM
I dont think you can add multiple polcies on one command line but if you must use a script file then for this sort of thing i have used the schedule name (-sl switch in the command).
Just make sure those policies all have the same schedule name (but that it is not used by other policies):
bpduplicate -dstunit 6drivesLTO4Prod -dp Datasafe -rl -1 -fail_on_error 0 -set_primary 0 -primary -number_copies 1 -mpx -sl My_Schedule_Name -L "D:\VERITAS\NetBackup\Logs\NBduplicate\Dup-FDS-1_mpx.log" -hoursago 36 -M bnpbkp1
Hope that helps
09-05-2014 08:23 AM
Hi Mark,
I change the schedule name for one policy, just for test and ran the command
bpduplicate -dstunit 6drivesLTO4Prod -dp Datasafe -rl -1 -fail_on_error 0 -set_primary 0 -primary -number_copies 1 -mpx -sl Full_diario_semanal_h -L "D:\VERITAS\NetBackup\Logs\NBduplicate\Dup-FDS-1_mpx.log" -hoursago 24 -M bnpbkp1.
But i'm getting a job error
12:10:55 INF - found no images or media matching the selection criteria
I confirmed that i have a job for this policy this morning so the job exist.
09-05-2014 08:37 AM
Did you change the schedule name, run a backup and then run the script?
A backup run before you changed the schedule wil still have the old schedule name in its catalog entry.
09-05-2014 10:32 AM
Hi Mark,
It worked, thanks!