cancel
Showing results for 
Search instead for 
Did you mean: 

Script to duplicate old tapes

andrich
Level 4

Hello Everybody

Is there a command to copy all the images/contents from a old tape to a new tape?

I know the bpduplicate can do that, but I have to find at first all the images on the old tape.

I have more than 200 old tapes to move the data to new one. Its a hard job.

NB 6.5.6 version, running on Solaris 10.

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

I suspect that bpduplicate may be using a default date range of last 24 hours if image id is not used.

Try to use your -id <media-id> command with a start date going back far enough:

-s mm/dd/yyyy

e.g. -s 01/01/2014 should pick up all images on that tape done since 1 Jan 2014.

Let us know how it goes.

View solution in original post

9 REPLIES 9

mph999
Level 6
Employee Accredited

bpduplicate will copy at a media level, I think it is -id option, just check the man page to confirm,

 

SymTerry
Level 6
Employee Accredited

Hello,

I would like to verify, the old tapes, were they written by NetBackup and are they not in your catalog? If they are not, the issue is you have 200 tapes that NetBackup doesn't know about. You would have to do a Phase1 Phase 2 import (see TECH43584) of all 200 tapes.

Also just for my curiosity, why are you looking to move the data to newer tapes? 

andrich
Level 4

Hello SymTerry

All my old tapes are in my Catalog. But I think its very hard to list the Catalog Images, select them and Duplicate.

I would like a commando to duplicate without list the images.

I am going to do this for a LTO4 to LTO6 upgrade.

 

mph999
Level 6
Employee Accredited

I just checked, -id is correct.

So ...

bpduplicate -id <media to copy> -dstunit <stu to use> -p <vol pool to use>

.. should do it.

It's easy to copy via image ... (from meory so might need a bit of tweaking)

bpimmedia -mediaid <media id> -l |grep FRAG |awk '{print $9}' |while read LINE

do

bpduplicate -id $LINE -dstunit <stu to use> -p <vol pool to use>

done

(Thats from memory, not sure if the media id on the frag line is the 9th field, think it is but easy to check)

You could add another loop to read the list of media from a file

andrich
Level 4

Hello mph999

I fired the command above, but show me an error.

bpduplicate -id S00793 -dp PL_HISTORY_SL24 -dstunit LTO
Duplicate started Mon Mar 31 14:14:08 2014
Activity monitor job id = 1395187
INF - found no images or media matching the selection criteria

But when I list the images and then bpduplicate, it works fine.

-bash-3.00# bpduplicate -backupid svsistel_1395572400 -dp PL_HISTORY_SL24 -dstunit LTO -cn 1
Duplicate started Mon Mar 31 15:22:15 2014
Activity monitor job id = 1395256
INF - Skipping copy 2 of backup id svsistel_1395572400, is not required copy 1.

INF - Destination storage unit svbackup-tl4000 on host svbackup
INF - Duplicating policy _svsistel-files-history schedule HISTORY backup id svsistel_1395572400 copy 1 created on 03/23/2014 08:00:00 on source media id S00793
INF - Duplicate of backupid svsistel_1395572400 successful.

INF - Status = successfully duplicated 1 of 1 images.

Thanks

 

 

Nicolai
Moderator
Moderator
Partner    VIP   

Try doing a bpimagelist -mediaid S00793

If nothing is returned - that the problem then - the backups on them are expired.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

I suspect that bpduplicate may be using a default date range of last 24 hours if image id is not used.

Try to use your -id <media-id> command with a start date going back far enough:

-s mm/dd/yyyy

e.g. -s 01/01/2014 should pick up all images on that tape done since 1 Jan 2014.

Let us know how it goes.

Nicolai
Moderator
Moderator
Partner    VIP   

Good point !

andrich
Level 4

Hello Marianne, 

As usual, you gave the solution.

The -s mm/dd/yyyy option really found all the images on the tape.

Thanks a lot.

Alexandre Andrich