cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate a duplicate copy from VTL to physical tape library

Tan_Hong_King
Level 3
Greetings,

How do I automate duplication of backup image from VTL to a physical tape library with NBU 5.x on Solaris platform ?

Is there any scripts for Solaris where after a successful backup to VTL, the script would create another copy to the physical tape library using the bpduplicate command ?

Note: I am not using the Inline Tape Copy feature because this would not improve my backup window.

Kindly advise.

Thanks and Regards
5 REPLIES 5

Elias_Biescas
Not applicable
Employee Certified
Hi,

Do you ever get a reply for your question?

I am been asked the same question..

Thanks,

DavidParker
Level 6
Well, there's always the Vault Option, if your company can afford the license.

Scripts I would think you would need to generate/customize yourself; I don't believe anything like that is available with the product (would kind of make Vault unnecessary).

Chia_Tan_Beng
Level 6
Hi HK,

If you have Vault option, it would do the job but if not, it the matter of scripting it (i.e. underlying Vault's duplicate function is using bpduplicate).

I suggest to start off with, you can use:
bpduplicate -PM -dp -hoursago

The -PM would displays the information on the backup to be duplicated, but does not perform the duplication. The nice thing of it is it also show the backup IDs that cannot be duplicate and it reason.

You can starts with a small value for the parameter -hoursago just to try out the command and building up the script.

Oh yes, add -v parameter to bpduplicate command would provide you with more information such as debug and progress logs.

Have fun.

Dave_Brown_3
Level 3
Let me start by saying I am not a Unix/Linux or any other kind if x guy.

That being said, Here is and explaination of manual duplication given to me by someone else. I have used this to create my own Windows batch files for duplication from my VTL to tape. I am told that I can schedule these via NTScheduler but I prefer to run manually as VLT tapes written vary day to day for me.

Hope this helps you folks, I am attempting to get Vault so I can have NB do this for me.



Tape image duplication, or as its sometimes called, cloning, takes place at this company
via Unix "cron" jobs that are scheduled to run once a week after the Full backups take
place over any given weekend.

Listing root's 'crontab' file for 'backup server01' shows the following.

#ident "@(#)root 1.19 98/07/06 SMI" /* SVr4.0 1.1.3.1 */
#
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
.
...
....
...
15 5 * * 1 /usr/openv/netbackup/bin/goodies/clone_sql_65_mis
15 19 * * 1 /usr/openv/netbackup/bin/goodies/clone_nt_os
5 5 * * 2 /usr/openv/netbackup/bin/goodies/clone_unix_servers
5 17 * * 2 /usr/openv/netbackup/bin/goodies/clone_herc_hydra

Looking at the manual page for 'crontab' the first five fields of any crontab
entry represent the days/time when jobs are scheduled to run.

(minute) (hour) (day of month 1-31) (month of year 1-12) (day of week, 0-6 0=Sunday)

The first of the four crontab entries listed here say to run the "clone_sql_65_mis"
script at 5:15am on Monday of any month of the year. The idea here was to
schedule a clone process early in the morning and one later in the day.

Each of the internally developed clone scripts uses the Netbackup supplied binary
called "bpduplicate". Listed below is the contents of a clone script called
by cron.


#!/bin/sh
#
# This script is run by cron to duplicate "full" backup images
# that match the following criteria.
#
# created within the last 72 hours
# members of the 'sql_65_mis' class
#
# See man page for bpduplicate for more information.

/usr/openv/netbackup/bin/admincmd/bpduplicate -dstunit bak01_dlt
-dp duplicate_full -hoursago 72 -st FULL -class sql_65_mis
-mpx -L /tmp/duplicate_log.sql_65_mis

Listed here is the syntax for the 'bpduplicate' binary.

bpduplicate -dstunit -dp
-hoursago <# hours> -st -shost -L


See the manual page for the 'bpduplicate' binary. The 'bpduplicate' line in the above
script instructs the system to locate all "FULL" backup images that were written by
the "sql_65_mis" class within the past 72 hours and duplicate those images to
the "duplicate_full" tape pool and to use a tape drive on 'acnschbak01' (bak01_dlt)
to write the duplicate images.

NOTE: The storage unit that wrote the original tape images must be the storage unit
that reads the original tape for duplication. In most cases (all but slave server),
the clone scripts have been configured to read/write to the same storage unit.
In other words, the system was configured so all original images in the 'sql_65_mis'
class get written to the 'bak01_dlt' storage unit. As a result, the clone script
forces the duplicate image to be written to 'bak01_dlt'. 'acnschbak01' reads the
source tape in one of its drives and writes the duplicate image to its second drive.

Since all of the slave servers (direct connects to the P3000 library), have only
one drive, cloning their FULL images requires that the slave reads the source
image on its drive, transmit that data over the network to the destination drive
on another server (usually 'bak01' or 'bak02').

Be very aware of impacting scheduled backups and server performance when making
changes to these scripts or their scheduling.

IMPORTANT:
Cloned backup images like all other images are tracked in the Netbackup index database.
Cloned images adhere to the same retention policies that the original images adhere to.
In order to help keep track of cloned images, especially when those images have
been expired and purged from the database, it is very important that the clone reports
that are emailed to the Netbackup administrator be printed and kept with the cloned
media. Without these reports there will be no other way to determine what data is on the
cloned media without scanning the tapes.


EXCEPTIONS:
There are three backup clients that do not utilize this scripted method of cloning. For
'hydra', 'hercules(informix)', and 'salesnet' a second full backup is schedules and
is directed to the "duplicate_full" pool for offsite storage. It was determined that
cloning these clients large images over the network was not efficient and the backup
window existed to run a second full each week.



Est.
Approx.
Duration
bpduplicate -dstunit bak01_dlt -dp duplicate_full -hoursago 72 -st FULL -class nt_os -mpx -L /tmp/duplicate_log2 hrs
bpduplicate -dstunit bak01_dlt -dp duplicate_full -hoursago 72 -st FULL -class sql_65_mis -mpx -L /tmp/duplicate_log6 hrs
bpduplicate -dstunit bak01_dlt -dp duplicate_full -hoursago 72 -st FULL -class unix_servers -mpx -L /tmp/duplicate_log

bpduplicate -dstunit bak02_dlt -dp duplicate_full -hoursago 72 -st FULL -class nt_os_bak02 -mpx -L /tmp/duplicate_log8 hrs
bpduplicate -dstunit bak02_dlt -dp duplicate_full -hoursago 72 -st FULL -class sql_prodref -mpx -L /tmp/duplicate_log
bpduplicate -dstunit bak02_dlt -dp duplicate_full -hoursago 72 -st FULL -class ibm_catplan -mpx -L /tmp/duplicate_log10 min.
bpduplicate -dstunit bak02_dlt -dp duplicate_full -hoursago 72 -st FULL -class sql_65_mis_fin02 -mpx -L /tmp/duplicate_log 1 hr


Initial thoughts on scheduling cloning:

MondayImplemented
-----------------

start:ends?resource needed:
5am sql_65_mis (runs for 6 hrs) -> 11ambak01_dltyes

5amnt_os_bak02 (runs 8 hrs) ---> 1pmbak02_dltyes

7pmnt_os (runs for 2 hrs) ---->9pmbak01_dltyes

7pmsql_65_mis_fin02 (runs 1.5 hrs)>9pmbak02_dlt*, fin02_dltyes



Tuesday
-------
start:ends:resource needed:
5amnt_os-exchange?bak02_dltyes
5amnt_os-exchange_msx01?msx01_dlt,bak02_dltyes
5pmmsexchange?bak02_dltyes
5pmmsexchange_msx01?msx01_dlt,bak02_dltyes
5amunix_servers6ambak01_dltyes
5pmhercules-OS6:30phercules_dlt,bak01_dltyes
5pmhydra?hydra_dlt,bak01_dltyes

bpduplicate -dstunit bak02_dlt -dp duplicate_full -hoursago 96 -st FULL -class nt_os-exchange -mpx -L /tmp/duplicate_log.os-xchng
bpduplicate -dstunit bak02_dlt -dp duplicate_full -hoursago 96 -st FULL -class nt_os-exchange_msx01 -mpx -L /tmp/duplicate_log.os-xchng.msx01
bpduplicate -dstunit bak02_dlt -dp duplicate_full -hoursago 24 -st FULL -class msxchange -mpx -L /tmp/duplicate_log.xchange
bpduplicate -dstunit bak02_dlt -dp duplicate_full -hoursago 24 -st FULL -class msxchange_msx01 -mpx -L /tmp/duplicate_log.xchange.msx01
bpduplicate -dstunit bak01_dlt -dp duplicate_full -hoursago 96 -st FULL -class unix_servers -mpx -L /tmp/duplicate_log.unix
bpduplicate -dstunit bak01_dlt -dp duplicate_full -hoursago 96 -st FULL -class hercules-OS -mpx -L /tmp/duplicate_log.herc.os
bpduplicate -dstunit bak01_dlt -dp duplicate_full -hoursago 96 -st FULL -class hydra -mpx -L /tmp/duplicate_log.hydra

Hung_Pham
Level 3
After all of that in unix/linux use crontab and bpduplicate.