Forum Discussion

sclind's avatar
sclind
Level 6
10 years ago

Consolidating tapes using bpduplicate

I was wondering if someone had already written a script to consolidate partially used tapes onto another tape.

I have instances where only a small portion of a tape was used yet the expiration dates are far in the future. I'd like to be able to basically say something like:

duptap -from abc123 -to xyz789

and have all the backup images (from 1 to n) on tape abc123 to copied to the end of tape xyz789.

Before I start scripting this I thought I'd check if someone had already done it.

The new tape would become the primary copy and then I would remove the old images (freeing up the old tape) for use again.

 

 

  • You cannot use bpduplicate to specify one media id as source and another as destination.

    The destination can only be specified as a Storage Unit and a pool.

    So, to ensure that one destination tape is used until full, create a new pool to be specified as destination and add MPF (Maximum number of partially full media) attribute for the pool as 1.
    If you do not have a Scratch pool, add Unassigned media to this pool.

6 Replies

  • I have done this task using Vault. I have created a vault with a profile that cover al my partially full media .This copied all the images from these media to a new media /volume  pool .This consolidated the images to one media and then I expired the images on partially filled media after making images the image on new media as Primarily. Hope this will help.

    DeepS

  • You cannot use bpduplicate to specify one media id as source and another as destination.

    The destination can only be specified as a Storage Unit and a pool.

    So, to ensure that one destination tape is used until full, create a new pool to be specified as destination and add MPF (Maximum number of partially full media) attribute for the pool as 1.
    If you do not have a Scratch pool, add Unassigned media to this pool.

  • Thanks for the info Marianne!  I was just starting work on this script and had not noticed this.

  • Another way to do this is to use a staging device - if you happen to have 20 - 30 TB of storage just hanging around. ( I used the storage we are deactivating, in the interim after servers were off and before we removed it)

    Write data from old tapes to disk. expire tape copies. Write from disk to tape, using limits on partially full tapes. Works like a champ

  • Sounds like no one has done this yet.  I made a little progress but haven't had time to do much.  Thanks for the info though.

  • This cannot be too hard  - try something like :

    bpduplicate -id <media_id> -dp <destination_volume_pool_name> 
    Here you can only do 1 media-id at a time.

    Something more complex would be to find all valid images on media with bpimmedia, then add all image IDs to a text file and use this file as input to bpduplicate with -Bidfile <file_name>

    See NetBackup Commands Reference Guide  for all command options and usage along with examples.