cancel
Showing results for 
Search instead for 
Did you mean: 

bpexpdate changing media expiration - media id is not assigned to this host

DK11
Level 0

Hi all,

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

Dave

22 REPLIES 22

Amol_Nair
Level 6
Employee
Can you share the output of
nbemmcmd -listmedia -mediaid <>

Marianne
Level 6
Partner    VIP    Accredited Certified

@DK11

Any chance you are using SLPs in the environment?

And that these media-ids are under SLP control? 

Alexis_Jeldrez
Level 6
Partner    VIP    Accredited Certified

Are you sure the media is active and not available?

We don't have any SLP Policies

The media status for some is active, but we also have status of Full, Full MPX and imported

nbemmcmd -listmedia -mediaid 0211L4

NBEMMCMD, Version: 7.6.0.3
====================================================================
Media GUID: 7fb47176-cbcd-429c-a6fc-f0e5007fa270
Media ID: 0211L4
Partner: -
Media Type: HCART3
Volume Group: ---
Application: Netbackup
Media Flags: 1
Description: Added by Media Manager
Barcode: QT0211L4
Partner Barcode: --------
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
Volume Expiration: -
Data Expiration: INFINITY
Last Written: 06/06/2015 02:58
Last Read: -
Robot Type: NONE
Robot Control Host: -
Robot Number: -
Slot: -
Side/Face: -
Cleanings Remaining: -
Number of Mounts: 9
Maximum Mounts Allowed: 20000
Media Status:
Kilobytes: 1060539720
Images: 33
Valid Images: 1
Retention Period: 8
Number of Restores: 0
Optical Header Size Bytes: 1024
Optical Sector Size Bytes: 0
Optical Partition Size Bytes: 0
Last Header Offset: 0
Adamm Guid: 00000000-0000-0000-0000-000000000000
Rsm Guid: 00000000-0000-0000-0000-000000000000
Origin Host: NONE
Master Host: aijyms06
Server Group: NO_SHARING_GROUP
Upgrade Conflicts Flag:
Pool Number: 9
Volume Pool: ENCR_EOM
Previous Pool Name: Scratch_Pool
Vault Flags: -
Vault Container: -
Vault Name: -
Vault Slot: -
Session ID: -
Date Vaulted: -
Return Date: -
Media on Hold: 0
====================================================================
Command completed successfully.

Marianne
Level 6
Partner    VIP    Accredited Certified
Please show us the bpexpdate command that you ran against this media-id.

Here is an example of one failing:-

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpexpdate -m 0211L4 -d 14/05/2025
Are you SURE you want to change (null)
to expire on 14/05/2025 00:00:00 y/n (n)? y
requested media id is not assigned to this host in the EMM database

Here is one that works ok:-

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpexpdate -m 5902L4 -d 02/01/2028
Are you SURE you want to change (null)
to expire on 02/01/2028 00:00:00 y/n (n)? y

 

 

 

Marianne
Level 6
Partner    VIP    Accredited Certified

So 'Last Write Host' for 0211L4 is media server aijyms03.ai.local. 

What happens if you add '-host aijyms03.ai.local' ? 

We get the same error after adding -host aijyms03.ai.local to the command e.g.

bpexpdate -m 0211L4 -d 14/05/2025 -host aijyms03.ai.local

Marianne
Level 6
Partner    VIP    Accredited Certified

Wait.... 

Maybe the error message is a 'red herring'. 

NBU expects -d value in this format:
mm/dd/yy 

Please try 05/14/2025?

Good try, but...

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpexpdate -m 0211L4 -d 05/14/2025 -host aijyms03.ai.local
Invalid start date: 05/14/2025

Marianne
Level 6
Partner    VIP    Accredited Certified

Okay, so, the date format has been changed in your environment.

The only logical conclusion now is that there is some inconsistency in your NBU databases.

Is this media server still actively being used in the environment?

Have you tried to run 'images on media' report?
bpimmedia -mediaid 0211L4 -U
Since there seems to be only one valid image left on the tape, there shouldn't be lots of output.

Please show us output. 

Hi Marianne,

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpimmedia -mediaid 0211L4 -U
--------------------------------------------------------------------------------
Backup-ID: AIJYMS01_1402787667
Policy: AIJYMS01
Schedule Type: FULL
Retention Level 8
Number of Files: 159761
Compression: Y
Encryption: N
Image Type: Imported
Primary Copy: 2
Expires: INFINITY
Image on Hold: 0
Indexing Status: 0

Copy Number: 2
Fragment Number: 1
Fragment Size (KB): 27969529
Media Type: RMed
Density: hcart3
File Number: 1
Offset: 2
Host: aijyms02.ai.local
Device Written On: 0
MPX: N
Expires: INFINITY
Retention Level: 8
MediaID: 0211L4
Copy on Hold: 0

Marianne
Level 6
Partner    VIP    Accredited Certified

Okay, media server here is listed as aijyms02.ai.local.

Is this media server alive and well in NBU environment? 

Yes we have 1 master , 4 media servers and all are live and well.

Marianne
Level 6
Partner    VIP    Accredited Certified

I see that you are still on NBU 7.6. 
So, I cannot ask you to log a call with Veritas Support to investigate what the issue is here.

 

nbemmcmd shows Last write host as aijyms03.ai.local
but this remaining image was written by media server Host: aijyms02.ai.local.

Are you using Media sharing and Multiple Retentions on media? 
'last image' written by aijyms03 already expired? 

Try to use -host as aijyms02.ai.local , or else try to change retention on the image-id:

bpexpdate -d <date>  -backupid AIJYMS01_1402787667

Tried with aijyms02.ai.local and got the same result.

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpexpdate -d 06/06/2020 -backupid AIJYMS01_1402787667

to expire on 06/06/2020 00:00:00
No changes made.

Also tried:-

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpexpdate -recalculate -ret 10 -backupid AIJYMS01_1402787667
Are you SURE you want to recalculate expiration dates on all images
that meet the following criteria:
backupid AIJYMS01_1402787667
retention will be changed to 10(10 years)

Continue?(y/n)y
requested media id is not assigned to this host in the EMM database

 

 

Marianne
Level 6
Partner    VIP    Accredited Certified
Can you confirm that you have enabled media sharing as well as multiple retention on media?
Media sharing is excellent, but multiple retentions is IMHO a very BAD idea.
I think the combination of these is what is confusing NBU here.

Absolute last idea....
Try to change media ownership to one specific media server:
bpmedia -movedb -m (media_id) -newserver (newservername)

If this does not work, you will need assistance from Veritas.