cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate tape to offsite using bpduplicate

liuyang
Level 6
Partner Accredited

Hi, I am using NBU 7.0.1 (master server OS is Windows 2008 R2) and plan to create bpduplicate script to duplicate backup images to tape for offsite store. I have create a volume pool named as offsite. I plan to duplicate backup images of some important clients and/or certain policies to offsite volume pool and export the media when it is full for offsite store.

My questions are:

1. I found bpduplicate has many parameters. I am a bit confusing. Which are the necessary ones in my case?

2. I want to duplicate backup images of certain clients or certian policies. Can I create a list of clients or policies? Or I need to put all the clients or policies after -client_name/-policy?

3. My offsite tape retention will be a few years. In order to be able to restore the backups, do I need to backup catolog to offsite as well?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Level 6
Partner    VIP    Accredited Certified

Apologies for giving you Unix scripts/commands - you were clear in your opening post about the OS on your master - Windows 2008 R2.

You could possibly try http://www.cygwin.com/

View solution in original post

12 REPLIES 12

Marianne
Level 6
Partner    VIP    Accredited Certified

Well, I am also a bit confused about your actual needs - do you want to duplicate full media or just certain images on the full media or just certain images regardless of whether the media is full?

To duplicate all images on a particular (full) media-id, I would use:

bpduplicate -dstunit dest_stunit_label -dp dest_volume_pool -id media_id

If I read the Commands Manual correctly, -client option takes only a single name:

-client name
Specifies the name of the client that produced the originals and is used as search criteria for backups to duplicate. The default is all clients.
(So, it seems all clients or one specific client...)

You might be better off searching for image id's for specific clients with bpimagelist and add these image id's to a text file (Bidfile). This Bidfile can then be used as option with bpduplicate:

-Bidfile file_name
file_name specifies a file that contains a list of backup IDs to be duplicated.
List one backup ID per line in the file. If this parameter is specified, other
selection criteria are ignored.

So, you can use this:

bpduplicate -Bidfile file_name -dstunit dest_stunit_label -dp dest_volume_pool 

 

Other options:

If you purchase the Vault options, all of your search criteria can be specified in the vault profile. You can then add this vault profile to a policy to automate the duplication.

You can also read up on Storage Life Cycle policies. (No additional license for tape-tape duplication.) Create SLP to specify backup and duplication destination. Add your selected clients to separate policies that specifies the SLP as destination (in stead of a storage unit). Duplications will be automated.

Deepak_G
Level 6
Certified

You can duplicate only certain images too if you know their backup id's.

bpduplicate -backupid xxx.xxx.com_1250003668 -dstunit STGUNIT -rl 12 -dp VOLUMEPOOL -fail_on_error 1

you can change your retention level, storage unit and volume pool in the above command.

 

Rajesh_s1
Level 6
Certified

If you have a vault license then you can automate your vault as per your reruiremnet . If you dont have then below is the simple steps which let us for duplication

2. I want to duplicate backup images of certain clients or certian policies. Can I create a list of clients or policies? Or I need to put all the clients or policies after -client_name/-policy?

You can select whcih ever the clinets or policies which you needs to vault . Select Duplicate option and you can select the required time frame of the backup . Then all the clients will be listed . You can choose the required client and right click you will get option 'duplicate ' , then specify the storage unit . Here even you can change the retention of the iamges which are going to offsite location .

3. My offsite tape retention will be a few years. In order to be able to restore the backups, do I need to backup catolog to offsite as well?

      In offsite location you need to import the images , because the offsite master server doesnt contain the catalog information of your source images . There are other options to address this but simple is you can import the tapes in the offsite location master server and you can able to restore ..

liuyang
Level 6
Partner Accredited

Hi everyone, thanks very much for your help. I created a script and it works successfully.

My script is someting like below:

bpduplicate -dstunit mediaserver -dp offsite -policy sql_full_clientA

The script above duplicates backup image of policy sql_full_clientA to offsite volume pool.

I have another question:

If I want to duplicate backup images from different policies, can I just add another line in the script for each policy? Or I can import list of policies from a file?

bpduplicate -dstunit mediaserver -dp offsite -policy sql_full_clientA

bpduplicate -dstunit mediaserver -dp offsite -policy sql_full_clientB

bpduplicate -dstunit mediaserver -dp offsite -policy oracle_full_clientC

......

Maybe another way is to import a list of backupID generated by different policies. But I want to automate the process. Is it possbile to automatically detect backupID from policies and exprot to a file? If can, then I can just add the file to the script.

The reason I want to specify by policy is that most of the clients have 2 or more policies. But only one of the policies on each client requires duplication of backup images for offsite store.

Deepak_G
Level 6
Certified

for i in `cat clientnames`
do
bpcatlist -client $i -since 24 | awk '{print $1}' > TEMPFILE
done

 

Now this TEMPFILE will have the list of backup ID's for the clients which you have specified in file clientnames

-since parameter refers to the lookup time.

Marianne
Level 6
Partner    VIP    Accredited Certified

You can also use bpimagelist in the 'for loop' to get image id's for a list of policy names:

for i in `cat policies`
do
bpimagelist -idonly -policy $i -hoursago 24 |awk '{print $8}' >> bidfile
done

You can now use the 'bidfile' as per my previous post with bpduplicate.

liuyang
Level 6
Partner Accredited

Thanks a lot for your answers.

I tried the for loop but seems it does not work. I am not sure about 'cat policies' or 'cat clientnames'. What do these do? Seems cat is a unix/linux command. I ran both but get no results.

Not all the policies require duplication to offsite tape. So I think I should create a list of policies which require duplication and put the list in the 'for loop'. Is there a way to do that?

Marianne
Level 6
Partner    VIP    Accredited Certified

Create a text file called 'policies'. Add all policy names that you want to duplicate in this text file.

Same will apply if you want to search specific clients - create text file that contains client names.

The 'for' statement will loop through all entries in the text file.

liuyang
Level 6
Partner Accredited

Thanks for the answers. I tried to write the scripts but were unable to get it run. I got an error which said 'cat' and 'awk' are not recognized as internal or external command. I did some research and looks like 'cat' is a unix command.

My questions is: can I run the script in Windows? Do you need to install some intepreter?

Marianne
Level 6
Partner    VIP    Accredited Certified

Apologies for giving you Unix scripts/commands - you were clear in your opening post about the OS on your master - Windows 2008 R2.

You could possibly try http://www.cygwin.com/

liuyang
Level 6
Partner Accredited

Hi Marianne, thanks.

My NetBackup license is front end capacity license. So I think I have Vault license. Can vault do the job of bpduplicate? Is it easier to configure vault? I found it is a bit hard for me to write bpjduplicate scripts to work in windows.

Marianne
Level 6
Partner    VIP    Accredited Certified

Apologies - I missed your last post...

Your license should allow you to configure Vault.

Once you've read the Vault manual and understand the different components that make up a vault profile, it is not too difficult to configure.

You need to define selection criteria and then duplication destination. You can also configure media to be automatically ejected after duplication.

Once you are happy with your vault profile, you can configure a policy to automatically run the vault profile.

Spend a day or two going through the Vault manual:

NetBackup Vault Administrator's Guide  http://www.symantec.com/docs/TECH127062

There is also a Vault Operator manual (reading for later on...): http://www.symantec.com/docs/TECH127063