cancel
Showing results for 
Search instead for 
Did you mean: 

bpduplicate script for specific policies

nandolester
Level 4

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.! :)

1 ACCEPTED SOLUTION

Accepted Solutions

Mark_Solutions
Level 6
Partner Accredited Certified

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.

View solution in original post

8 REPLIES 8

Michael_G_Ander
Level 6
Certified

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

The standard questions: Have you checked: 1) What has changed. 2) The manual 3) If there are any tech notes or VOX posts regarding the issue

nandolester
Level 4

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 :(

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

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

Nicolai
Moderator
Moderator
Partner    VIP   

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

 

Mark_Solutions
Level 6
Partner Accredited Certified

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

nandolester
Level 4

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.

Mark_Solutions
Level 6
Partner Accredited Certified

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.

nandolester
Level 4

Hi Mark,

 

It worked, thanks!