cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting VCB backup policy in NetBackup 6.5.4

matt_gelder
Level 2
Hi all,

I'm trying to finish off the automation of a load of backup policies I'm creating using the bppl commands. I've all but one of my scripts working to create the policies. We've NetBackup 6.5.4 running on Windows Server 2008 64bit. We have a VCB Proxy server configured to take snapshot backups of Virtual Machines.

Most of the policies use the following steps - bppolicynew -> bpplinfo -> bpplclients -> bpplsched -> bpplschedrep -> bpplinclude to configure the policy and add the requisite lines.

When I come to script the VCB backup however I'm unable to use the bpplinfo command to set the Backup Policy correctly. I'm presuming I'm doing something dumb along the way.

I've created the policy already using
>bppolicy SERVERNAME_VCB

I can update the SERVERNAME_VCB policy using the syntax:
>bpplinfo SERVERNAME_VCB -set -active -collect_bmr_info 0 -collect_tir_info 0 - disaster 0 -multiple_streams 0 -pool POOLNAME -pt FlashBackup-Windows -residence ROBOTNAME

However I want to specify the following commands and am currently unable:
-snapshot_method "vmware"
-use_virtual_machine 1
-virt_mach_proxy_name "VCBProxyName"
-offhost_backup 1
-snapshot_method_args "mntpt=D:\,Virtual_machine_backup=2,trantype=5,vmdktype=0,disable_quiesce=1"

However the bpplinfo command returns the lines:
Perform snapshot backups required to be set to use these settings
Perform snapshot backups required to be set to use these settings
USAGE: bpplinfo.............

I'm sure I'm missing something silly here and was hoping someone here would be able to help me.

Many thanks and kind regards

Matt
1 ACCEPTED SOLUTION

Accepted Solutions

matt_gelder
Level 2
Hi Stuart,

Thanks for that. We've just got it working with the following 2 lines:

bpplinfo SERVERNAME_VCB -set --pt FlashBackup-Windows -active -collect_bmr_info 0 -collect_tir_info 0 - disaster 0 -multiple_streams 0 -pool POOLNAME  -residence ROBOTNAME

bpplinfo SERVERNAME_VCB -modify --pt FlashBackup-Windows -offhost_backup 1 -use_virtual_machine 1 -alt_client_name VCBSERVER -snapshot_method "vmware" -snapshot_method_args "mntpt=D:\,Virtual_machine_backup=2,trantype=5,vmdktype=0,disable_quiesce=1"

I don't know why we had to do it on two lines - but it's worked and we can continue now.

I realised we could do it through the GUI - but I'm trying to automate it as we've several environments to deploy it to and more importantly I'm not doing the deployment so I need to make sure it's done right :)

Many thanks for your help

Matt

View solution in original post

4 REPLIES 4

Anonymous
Not applicable
Here is the output from a VMware policy. From the command output you get you should set 'Perform Snapshot Backup' to Yes. (But how not sure -see below)
Policy Type:            FlashBackup-Windows (29)
Active:                 yes
Effective:              06/29/2009 13:40:12
Follow NFS Mounts:      no
Cross Mount Points:     no
Client Compress:        no
Collect TIR info:       no
Policy Priority:        0
Ext Security Info:      no
File Restore Raw:       yes
Client Encrypt:         no
Max Jobs/Policy:        2
Mult. Data Stream:      no
Block Level Incremental:        no
Perform Snapshot Backup:        yes
Snapshot Method:                VMware
Snapshot Method Arguments:      mntpt=f:\mnt,Virtual_machine_backup=3,trantype=0,vmdktype=1,disable_quiesce=0,vmmono=0
Perform Offhost Backup:         yes
Backup Copy:                    0
Use Data Mover:                 no
Data Mover Type:                2
Use Alternate Client:           no
Alternate Client Name:          barney
Use Virtual Machine:            1
Hyper-V Server:         (none)
Enable Instant Recovery:        no
Disaster Recovery:      0
Collect BMR Info:       no
Max Frag Size:          0 MB
Checkpoint Restart:     no
Residence:              sma2-d2m0-tld0
Volume Pool:            Daily
Server Group:           *ANY*
Data Classification:            -
Residence is storage lifecycle policy:  no
Granular Restore:       no
Generation:     36

Barney is the name of my VCB proxy.

bpplinfo -Q give extended options which you have obviously found, but I cant see in there the obvious one to set the parameter for "perform snapshot backup". This stuff is not in the 6.5 base docs and cant see updates to the command in the interim update docs.

bpplinfo -Q
USAGE: bpplinfo [-verbose] [-help] [-Q] [-snapshot_list_all] [-template]
           [-clienttype|-t|-ct class_type] [-concurrent_data flag]
           [-rcmd "restore command"] [-bcmd "backup command"]
           [-fragsize max_fragment_size]
           [-proxyclient host_name] [-secinfo flag]
           [-fi flag (0=False,1=True)] [-bc backup_copy_value]
           [-classjobs max_jobs(0=unlimited)]
           [-enable_pfi flag (0=False,1=True)]
           [-offhost_backup flag (0=False,1=True)]
           [-use_alt_client flag (0=False,1=True) -alt_client_name "alternate client name"]
           [  -use_virtual_machine 0
            | -use_virtual_machine 1 -virt_mach_proxy_name "virtual machine proxy name"
            | -use_virtual_machine 2 -hyperv_server "Hyper-V server name"
           ]
           [-use_data_mover flag (0=False,1=True) -data_mover_type 1 | 2 | 3 (1=TPC,2=MSC,3=NAS)]
           [-snapshot_method "method"
              [-snapshot_method_args "keyword=value"]]
           [-snapshot_list_policy]
           [-snapshot_list_all_for_client -M master -vfm_client_name client ]



You can see what the options set within the policy attributes are in the file %install_path%/netbackup/db/class/<policy_name>/info

Interestingly there is nothing about perform snapshot backups. Is it switched on as a dependency for another configurable option.?
Contents of info file for the above policy:

CLIENT_TYPE 29
FOLLOW_NFS_MOUNTS 0
CROSS_MOUNT_POINTS 0
CLIENT_COMPRESS 0
PRIORITY 0
CLIENT_ENCRYPT 0
DISASTER_RECOVERY 0
MAX_JOBS_PER_CLASS 2
MAX_FRAG_SIZE 0
ACTIVE 0
EFFECTIVE_TIME 1246282812
COLLECT_TIR_INFO 0
EXTENDED_SECURITY_INFO 0
IND_FILE_RESTORE_FROM_RAW 1
BLOCK_INCREMENTAL 0
STREAMING 0
FROZEN_IMAGE 1
BACKUP_COPY 0
NUMBER_OF_COPIES 1
FAIL_ON_ERROR 0
CHECKPOINT 0
CHKPT_INTERVAL 0
ENABLE_PFI 0
OFFHOST_BACKUP 1
USE_ALT_CLIENT 0
USE_DATA_MOVER 0
DATA_MOVER_TYPE 2
COLLECT_BMR_INFO 0
RES_IS_SS 0
GRANULAR_RESTORE_INFO 0
JOB_SUBTYPE 0
USE_VIRTUAL_MACHINE 1
GENERATION 36
CLASS_ID BD413F49089C4A929B1620F6EBF7B35F
ALT_CLIENT_NAME barney
SNAPSHOT_METHOD VMware
SNAPSHOT_METHOD_ARGS mntpt=f:\mnt,Virtual_machine_backup=3,trantype=0,vmdktype=1,disable_quiesce=0,vmmono=0
RESIDENCE barney-d2m0-tld0 *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL*
POOL Daily NetBackup NetBackup NetBackup NetBackup NetBackup NetBackup NetBackup NetBackup NetBackup
SHARE_GROUP *ANY*
DATA_CLASS *NULL*
#VMD5_DIGEST=34 e8 78 d1 08 f7 nn b2 2b 26 e1 07 16 nn nn nn

(Of course there is the GUI to set all this.)

matt_gelder
Level 2
Hi Stuart,

Thanks for that. We've just got it working with the following 2 lines:

bpplinfo SERVERNAME_VCB -set --pt FlashBackup-Windows -active -collect_bmr_info 0 -collect_tir_info 0 - disaster 0 -multiple_streams 0 -pool POOLNAME  -residence ROBOTNAME

bpplinfo SERVERNAME_VCB -modify --pt FlashBackup-Windows -offhost_backup 1 -use_virtual_machine 1 -alt_client_name VCBSERVER -snapshot_method "vmware" -snapshot_method_args "mntpt=D:\,Virtual_machine_backup=2,trantype=5,vmdktype=0,disable_quiesce=1"

I don't know why we had to do it on two lines - but it's worked and we can continue now.

I realised we could do it through the GUI - but I'm trying to automate it as we've several environments to deploy it to and more importantly I'm not doing the deployment so I need to make sure it's done right :)

Many thanks for your help

Matt

Anonymous
Not applicable
Matt, good to know that works.

Using 2 commands seems to follow the concept of why they put two sets of effective options, one of them 'hidden' in the -Q option of bpplinfo.
You should mark your topic as a solution now it has been solved.

Have a good day.

Nicolas_Cure
Level 4
Certified
Hi,

I´m looking to do something similar and wonder if you´ve run into this.

I already have the policy but want to update the client list with a script so that when new VMs are added/removed it will update without manual intervention.

Thanks for your help.

Nicolas