How to restore from a different copy of the backup.

How to restore from a different copy of the backup.

Article: 100019393
Last Published: 2018-04-05
Ratings: 3 2
Product(s): NetBackup


When trying to restore from a backup that has multiple copies, NetBackup will request the Primary Copy.  

If that copy is not available, the restore will fail. This article explains how to restore from a tape that is not the original Primary Copy.


There are several ways to restore from a backup that is not the Primary Copy:

1. You can restore via the command line and use the bprestore command with the -copy switch (valid in NetBackup Version 6.0 Maintenance Pack 5 (MP5) and onwards).
For example, to restore a file (file1), from copy 2, which was backed up between 04/01/2006 06:00:00 and 04/10/2006 18:00:00:
/usr/openv/netbackup/bin/bprestore -copy 2 -s 04/01/06 06:00:00 -e 04/10/06 18:00:00 /usr/user1/file1
On Windows:
install_path\VERITAS\NetBackup\bin\bprestore  -copy 2 -s 04/01/06 06:00:00 -e 04/10/06 18:00:00 C:\user1\file1

2.  You can change which copy is considered the Primary Copy:
a) Via the command line, using the bpduplicate command with the -npc and -backupid switch:
For example, to restore files from copy 2, where the backup id is bob_1216710249
/usr/openv/netbackup/bin/admincmd/bpduplicate -npc 2 -backupid bob_1216710249
On Windows:
install_path\VERITAS\NetBackup\bin\admincmd\bpduplicate -npc 2 -backupid bob_1216710249
b) Via the GUI:
1. Go to the Catalog section of the GUI.
2. Select verify and the copy number of the image you wish to use (copy number is found in the top right of the window).
3. For Date/Time Range From, enter the same start date used in the Backup, Archive and Restore (BAR) GUI to view the files.
4. For Date/Time Range To, enter the same end date used in the BAR GUI.
5. Click Search Now.
6. Right click on image you wish to restore from and select Set Primary Copy.
The restore will now default to using the new Primary Copy.
3.  If you have several images you wish to restore from alternate copies (for example, in a disaster recovery situation), it is quicker to create a file ALT_RESTORE_COPY_NUMBER containing the number of the copy you want to use. Once this file is in place, the BAR GUI will always use the copy number defined in this file.
On the master server, run the following command:
echo 2 > /usr/openv/netbackup/ALT_RESTORE_COPY_NUMBER   (Replacing '2' with the desired copy number)
On Windows:
1. Create the following text file on the Master Server.
2. Enter the copy number to use as a single line of text within this file.
3. Remove the ".txt" extension from the file.

Note: Be sure to remove or rename the ALT_RESTORE_COPY_NUMBER file once the restore has completed. Failure to do so will result in the backup copy number listed in this file being used for all future restores. This can result in failures when the copy number does not exist or is not available for restore.

If you attempt to preview which tape is required in the GUI, it will still display the Primary Copy's Media ID. The restore will, however, proceed using the copy number stored in ALT_RESTORE_COPY_NUMBER

Was this content helpful?