cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically move media to an Expired volume pool when the data expiration period has passed

Alun
Level 4

Hi,

I am managing the removal and disposal of a number of old backup tapes as and when the data that they contain expires.

What I would like to happen is that tapes with a barcode beginning 1 and a media type of HCART or HCART2 are automatically moved to the "Expired" volume pool as soon as the last valid image that they contain expires.

1. I have created the volume pool named Expired (number 12),

2. Created a new barcode rule as follows:

rule number:  2
barcode tag:  10
media type:   HCART2
pool name:    Expired
max mounts:   0
description:  Move expired tapes.

Will tapes that match the above barcode rule automatically be assigned to the Expired volume pool when the data that they contain expires or do I need to carry out further steps?

 

Many thanks,

Alun.

1 ACCEPTED SOLUTION

Accepted Solutions

StefanosM
Level 6
Partner    VIP    Accredited Certified

You can use the media_deassign_notify.cmd script that is running at the master server when netbackup expires a media.

The script does not exist by default and you have to copy the sample script from ..\netbackup\bin\goodies directoty to ..\netbackup\bin directory. Or create you own from scratch.

change the  script according to your needs.

for example the command to change the volume pool of an unassigned media is
vmchange [-h <EMM_server> | <volume_database_host>]   -p <pool_number> -m <media_id>

 

 

 

 

 

View solution in original post

7 REPLIES 7

Andy_Welburn
Level 6

1. Fine - but potentially redundant (see 2)

2. Unfortunately barcode rules are utilised when *new* media is inventoried in to the library.

 

I cannot think of anything within NB that  will do this automatically, so I can only see this as being a manual exercise.

If you are concerned that the media is going to be used again prior to you being able to destroy them then you could apply a volume expiration date to them *now*. Just right-click the media in the GUI & select change. The volume expiration date (do not confuse with data expiration) is a date you set arbitrarily after which you deem the media to be un-usable (a sort of sell-by date) - once that date has passed the media will not be used for any further backups.

StefanosM
Level 6
Partner    VIP    Accredited Certified

You can use the media_deassign_notify.cmd script that is running at the master server when netbackup expires a media.

The script does not exist by default and you have to copy the sample script from ..\netbackup\bin\goodies directoty to ..\netbackup\bin directory. Or create you own from scratch.

change the  script according to your needs.

for example the command to change the volume pool of an unassigned media is
vmchange [-h <EMM_server> | <volume_database_host>]   -p <pool_number> -m <media_id>

 

 

 

 

 

Alun
Level 4

Hi Andy,

The media that I'm dealing with has been removed to fire safes so thankfully it'll never get back into circulation, I was just hoping to be able to identify these tapes so that our tape custodians can go to the safes and remove them for destruction.

As you suggest, it looks like I'll have to do this manually which is rather unfortunate.

Thanks,

Alun.

Andy_Welburn
Level 6

If I could +1 this I would!

Alun
Level 4

Hi StefanosM,

That might be a solution that I could use but will that affect all media when images expire? Our normal daily and weekly backups to tape expire and need to revert back to the scratchpool for re-use.

 

Thanks,

Alun.

Andy_Welburn
Level 6

As it currently stands the script just updates log(s) with media that has been unassigned. So you'd  just have to add a bit of 'clever' scripting to qualify the media that it affects

e.g. if barcode begins with 1 and media type='whatever' then do the vmchange.

StefanosM
Level 6
Partner    VIP    Accredited Certified

the script will run for every expiration.

Netbackup passes to the script, among other, the name of the media, so you can check it and if it meets your criteria then move it to the right pool.

The command to check the media is the vmquery. this command will give you the barcode and the type of the media.

Then you have to run the vmchange command 

 

netbackup passes to the script the folowing 


       %1 = MEDIA ID           - the media ID             (e.g. A00001)
        %2 = LEGACY MEDIA TYPE  - the legacy media type    (e.g. 3)
        %3 = BARCODE            - the barcode of the media (e.g. 111222L3)
        %4 = ROBOT NUMBER       - the robot number         (e.g. 0)
        %5 = ROBOT TYPE         - the robot type           (e.g. 8)