cancel
Showing results for 
Search instead for 
Did you mean: 

How to select media when attempting a restore?

KASA
Not applicable
Hello all,

I'm new to NetBackup. We are using version6.0 MP7.

Two sets of backups were taken of the client (Solaris client) just in case the initial backup did not work when it was needed for a restore.

My question - I am trying to restore the backed up files but I want to use the 2nd copy of tapes - as the set of tapes used for the primary copy is not successful. Can someone please help in expalining how I can specify exactly which tapes to restore from?

Hope I make some sense.

Any help is appreciated.

Regards.
5 REPLIES 5

mph999
Level 6
Employee Accredited
You could use bpimagelist to find the 2nd copy or in the catalog window, look up the client using copy 2, right click and set to primary.

However, if the promary copy is really of no use, just expire it which will cause copy 2 to become copy 1.  bpexpdate -m <media id> -d 0
This will hoever, expire all the images on that tape.


Martin

James_Perry
Level 4

See the manpage on bprestore.  It mentions both -copy X to specify the copy, at least from the command line, to use for the restore.  Also there is the ALT_RESTORE_COPY_NUMBER file that specifies the copy to use for restores.  At the bottom of the -copy X section it mentions lookign at the NetBackup Backup, Archive, and Restore Getting Started Guide for more information.

      -copy x    Specifies the copy number to restore from. The user is able
                to restore from a different copy than the primary copy. For
                example, -copy 3 restores copy 3 of a file or list of files.

                Alternatively, you may specify the copy from which to
                restore at a global level (for all restore operations) by
                putting the copy number into the file
                ALT_RESTORE_COPY_NUMBER.

                Refer to the "Restoring from a specific backup copy" section
                of the NetBackup Backup, Archive, and Restore Getting
                Started Guide for a complete description.

James_Perry
Level 4
To remove only a specific image and specific image from a tape, you would use the command:
bpexpdate -d 0 -backupid <backup ID to be removed> -copy X.

So bpexpdate -d 0 -backupid  fred_1254014512 -copy 1 will remove copy 1 for the backup ID fred_1254014512 regardless of the media it resides on. 

This keeps from deleting any other images on that tape, just the ones that are failing to restore.

quebek
Moderator
Moderator
   VIP    Certified
Hello
I would play with bpchangeprimary comman, let me quote command's guide:
"NAME
bpchangeprimary - promote a copy of a backup to be the primary copy
SYNOPSIS
/usr/openv/netbackup/bin/admincmd/bpchangeprimary -copy number | -pool
volume_pool | -group volume_group [-id backup_id] [-M master_server]
/usr/openv/netbackup/bin/admincmd/bpchangeprimary -copy number | -pool
volume_pool | -group volume_group [-sl schedule_name] [-pn
policy_name] [-st schedule_type] [-pt policy_type] [-cl client_name]
[-kw keyword] [-sd date] [-ed date] [-M master_server]

DESCRIPTION
The bpchangeprimary command lets you change which copy is the primary
copy for a set of backup images. You can choose the copy to be promoted to
primary by specifying a copy number, volume pool, or volume group. You can
apply several optional criteria to identify the backup images to be affected.
The primary copy of a backup is the copy used by a restore process. Ensure that
the primary copy is accessible for restore. For instance, if one copy of a backup
was sent off site, change the primary copy to be the copy that remains on site.
The bpchangeprimary command finds all backups that match the specified
criteria and updates their copy number to primary.
If you use the -copy option, the specified copy number becomes the primary
copy. If you use the -group or -pool option, the process identifies all media IDs
that belong to the specified volume group or volume pool. It then changes all
copies that reside on those media to primary.(...)"

Full description you can find in these docs:
- Commands for UNIX and Linux (  http://seer.entsupport.symantec.com/docs/290234.htm )

robertojd
Level 2
On the catalog branch of the Java GUI you can filter the backup image you're going to restore, specifying "Copy 2" in the box for that purpose, and then right-click on the image name and select the option that says something like "Mark copy as primary". The restore job will default then to that copy.