Manually mount vol A00005 from pool NetBackup on file /tmp/tapefile. This is helpful if you need to dump data to a tape outside of the NBU application. As NBU mounts the tape it will not attempt to use the tape or drive again until the tape is unmounted.

# tpreq -m A00005 -p NetBackup /tmp/tapefile

Once the tape is mounted then data can be copied to /tmp/tapefile via tar, dd etc.

Unmount the tape which was mounted above

# tpunmount -f /tmp/tapefile

To run a dd test on the cart V05673

# dd if=/dev/rmt/51cbn of=/dev/null bs=256k

Change a volume pool for a volume. Note that it is only possible to change the volume pool for an unassigned tape cartridge i.e. a cartridge listed in the NBU catalog as being empty.

# vmchange -p volume_pool_id -m media_id

Add a scratch pool to NBU

# vmpool -add scratch “Scratch Pool” ANYHOST -1 -2

List the scratch pool in use

# vmpool -listscratch

To unfreeze a tape  

# bpmedia -unfreeze -m <barcode>

To add a tape, which is in slot 1 in the library (rc1 1) to the volume database on a master server but the robotic control host is on nbumedia1

# vmadd -m A00001 -mt dlt -h nbumaster -rt tld -rn 0 -rh nbumedia1 -rc1 1

When adding a cleaning cartridge to NBU to enable NBU to carry out the cleaning you must specify the density type as

<density>_clean i.e. HCART_CLEAN / HCART2_CLEAN

To delete a tape from the volume database

# vmdelete -h nbumaster -m media_id

To expire a volume immediately

# vmchange -exp expiration_date -m media_id

# vmchange -exp 0 -m SE2005

To deassign a volume so you can move it between volumes pools. Once that is done then use vmchange to move, if needed.

# vmquery -deassignbyid mediaid pool_id stat

# vmquery -deassignbyid SE2005 3 0

The stat value refers to the type of backups the cart was used for : 0 is for regular backups, 1 is for catalog backups

If you want to get rid of the images that are on a tape, expiring the tape itself will also expire all images on the tape. The following will expire the tape and corresponding images immediately

# bpexpdate -ev mediaid -d 0

Add the use_seed option to automatically generate media ids

#  vmupdate -rt tld -rn 0 -rh nbumedia1 -h nbumaster -use_seed

To see a list of media expiration dates:

# bpmedialist -summary

To erase a tape – be careful as this will not check if valid images are present on the tape before erasing it.

# bplabel -erase -m <barcode> -d <density> -p <volume_pool> -host <media server to perform the erasure>

The bplabel command will mount the tape onto a tape drive visible to the specified media server and erase the tape header, hence you will see the erase job within the NBU job DB.

To add a barcode rule

# vmrule -add <barcode_tag> <media_type> <volume pool> <max mounts> <description

To add a rule so that all barcodes with a first character of “T”, a density of HCART2 and no maximum mounts are added to the scratch pool, use :

# vmrule -add T hcart2 Scratch 0 "Data Tapes"

To delete a barcode rule

# vmrule -delete <barcode_tag>

# vmrule -delete T