How to create a holdname and put images on hold using the nbholdutil command line.

Article:HOWTO95446  |  Created: 2014-03-25  |  Updated: 2014-03-30  |  Article URL http://www.symantec.com/docs/HOWTO95446
Article Type
How To



 You must initially create a holdname to store your held images.  The Command below creates the holdname "Legal" and put the image nbmaster1_1395494387 on hold.

1)  Open a command prompt (running as administrator) and cd to the C:\Program Files\Veritas\NetBackup\bin\admincmd directory.
 
nbholdutil -create -holdname Legal -backupid nbmaster1_1395494387 -allcopy
 
 WARNING: Applying the hold will override the backup image retention period settings with an infinite
 retention level. As a consequence, on-hold images could potentially be held infinitely.
Also for snapshot images, hold is applied on only backup image copies
 
Successfully created Hold with id 1.
 
 Successfully Added Images (1)
 
2)  You can add additional images to the holdname individually.   Below is an example of adding one image to the holdname Legal:
 
Open a command prompt (running as administrator) and cd to the C:\Program Files\Veritas\NetBackup\bin\admincmd directory and issue this command:
 
nbholdutil -add -holdname Legal -backupid nbmaster1_1395674011 -allcopy
 
WARNING: Applying the hold will override the backup image retention period settings with an infinite
retention level. As a consequence, on-hold images could potentially be held infinitely.
Also for snapshot images, hold is applied on only backup image copies
 
Successfully added image(s) to Hold with name Legal.
 Successfully Added Images (1)
 
3)  To add multiple images to a holdname using a bid/feed file do the following:
 
Syntax for  bid/feed file holding primary copy (<backupid> p).
Syntax for  bid/feed file holding all copies (<backupid> a).
 
In this example I listed 8 backupid's where I am holding all copies.  Create a text file listing backupid and specify either all copy or primary copy.  
In this example I saved this text file in a directory called c:\nbhold and named the file nbhold.txt.
 
nbmaster1_1395494361 a
nbmaster1_1395494331 a
nbmaster1_1395494254 a
nbmaster1_1395494227 a
nbmaster1_1395494200 a
nbmaster1_1395494172 a
nbmaster1_1395494128 a
nbmaster1_1395494016 a
 
 
Open a command prompt (running as administrator) and cd to the C:\Program Files\Veritas\NetBackup\bin\admincmd directory and issue this command:
 
nbholdutil -add -holdname Legal -filepath c:\nbhold\nbhold.txt
 
C:\Program Files\Veritas\NetBackup\bin\admincmd>nbholdutil -add -holdname Legal -filepath c:\nbhold\
nbhold.txt
 
WARNING: Applying the hold will override the backup image retention period settings with an infinite
retention level. As a consequence, on-hold images could potentially be held infinitely.
Also for snapshot images, hold is applied on only backup image copies
 
Successfully added image(s) to Hold with name Legal.
 Successfully Added Images (8)
 
4)  To display the output of all images/backupid's on hold run the below command.
 
Open a command prompt (running as administrator) and cd to the C:\Program Files\Veritas\NetBackup\bin\admincmd directory and issue this command:
 
nbholdutil -list
 
1 Legal User  Open nbmaster1_1395494387#1 nbmaster1_1395494361#1 nbmaster1_1395494331#1 nbmaster1_13
95494254#1 nbmaster1_1395494227#1 nbmaster1_1395494200#1 nbmaster1_1395494172#1 nbmaster1_1395494128
#1 nbmaster1_1395494016#1 nbmaster1_1395674011#1
 
 
5)   To verify that that your images are assigned to a hold using the bpimagelist command.
 
Open a command prompt (running as administrator) and cd to the C:\Program Files\Veritas\NetBackup\bin\admincmd directory and issue this command:
 
bpimagelist -hoursago 48 -L  -> this will display all images written in the last 48 hours.  Note the "Image on Hold" field and "Copy on Hold" fields.
 
Client:            nbmaster1
Backup ID:         nbmaster1_1395674011
Policy:            nbholdutil2
Image On Hold:     1
Copy on hold:     1
 
With this information you should be able to create a holdname and place images/backupid's in said holdname.  The image expiration date/time is not honored if an image is held.  Holding a large number of images can increase the size of the Netbackup catalog.  



Article URL http://www.symantec.com/docs/HOWTO95446


Terms of use for this information are found in Legal Notices