I see that there are lots of post on using bpexpdate to changing media expiration using the following command:
bpexpdate -m <media ID> -d <DATE> -host <media server> -force
This work great for most of the media we have assigned, unfortunately we are also seeing results with the following error:
requested media id is not assigned to this host in the EMM database
the -host option should fix this, but it is not working for us.
Has anyone else got this issue and fixed it.
Thanks in advance
We did not have multiple retention or media sharing.
However I have now enabled media sharing and used the bpmedia -movedb -m (media_id) -newserver (newservername) command for the effected tapes on all media servers. Then was able to successfully change the expiration date for all of the tapes.
Thanks for your help. Good one
Glad that it worked for you.
If you did NOT have media sharing OR multiple retentions enabled, then something was REALLY wrong here.
Last Write Host: aijyms03.ai.local
Created: 23/10/2014 14:21
Time Assigned: 27/10/2014 19:31
First Mount: 27/10/2014 19:32
Last Mount: 05/06/2015 23:58
Data Expiration: INFINITY
Last Written: 06/06/2015 02:58
Valid Images: 1
Backup-ID: AIJYMS01_1402787667 date = Saturday, 14-Jun-14 23:14:27 UTC
The only logical explanation that I had for the above was that Media sharing was enabled and the other 32 images had already expired, leaving only 1 valid, unexpired images.
Anyway - glad it worked for you.
Please be aware that there are two expiration dates - the backupid/image and the media
When you use bpexpdate to extend the expiration date of images, the media expiration date of the media gets pushed out with them, so if you check the media in the volume pool listing, you will see the most future date. Even if you change all the images to an earlier date, the media will not change with them, apparently. However, once all valid images expire, the media will too.
What does this mean? If you have image1 on tapeA, expiring 1/1/2019 if you check the media, the data expiration will say 1/1/2019. If you use bpexpdate to extend the expiration date to 1/1/2020, the media will update and indicate 1/1/2020.
If you then use bpexpdate to reset the expiration to 1/1/2019, the media expiration will remain 1/1/2020, even though no images expire then.
If you are particular, you can use bpexpdate -media and reset the expiration of the media, then bpexpdate -recalc to reset the images to put them back in sync.
I would also heartily recommend double checking to make sure that the list of images you THINK you are changing, matches what you are ACTUALLY changing. There is no worse feeling then seeing images expire that you did NOT mean to include. OOPS! Hope no one wanted THAT restore...