cancel
Showing results for 
Search instead for 
Did you mean: 

bpexpdate -deassignempty

Dirk_Mueller
Level 5

Hi,

 

bpexpdate -deassignempty don´t delete valid images of a tape???

I have some assigned tapes, with (I think) no images on it. I want to delete them, but it´s not possible, because they are assigned.

Now I want to unassign them with bpexpdate. After that I want to delete them.

I checked the tapes with

bpmedialist -mcontents -m XXXXX -U

 

Kind regards

Dirk

1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6

This will do exactly what it says - any empty tapes are deassigned (unassigned) - which should then allow you to delete them (I presume you mean actually remove them totally from NB as they are no longer part of your environment)

Normally run as part of the normal clean-up procedure (every 12 hours), but can be run manually if required.
 

View solution in original post

13 REPLIES 13

Andy_Welburn
Level 6

This will do exactly what it says - any empty tapes are deassigned (unassigned) - which should then allow you to delete them (I presume you mean actually remove them totally from NB as they are no longer part of your environment)

Normally run as part of the normal clean-up procedure (every 12 hours), but can be run manually if required.
 

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

bpexpdate -deassignempty will not delete valid images - it will simply deassign tapes where all images have expired and you don't want to wait for the 12-hourly cleanup.

Another reason that will keep expired tape 'Assigned' is if the tape is frozen.

Please show us output of one of these tapes:

nbemmcmd -listmedia -mediaid <media-id>

Dirk_Mueller
Level 5

nbemmcmd-output:

 

NBEMMCMD, Version:7.1.0.4
====================================================================
Media GUID:                     7dc08c21-b768-410c-bb02-00e92b3b4c89
Media ID:                       ZP0758                             
Partner:                        -                                  
Media Type:                     HCART2                             
Volume Group:                   ---                                
Application:                    Netbackup                          
Media Flags:                    1                                  
Description:                    ---                                
Barcode:                        ZP0758                             
Partner Barcode:                --------                           
Last Write Host:                vms-zv01                           
Created:                        10/08/2007 10:50                   
Time Assigned:                  01/02/2008 18:01                   
First Mount:                    10/10/2007 01:33                   
Last Mount:                     07/28/2008 19:49                   
Volume Expiration:              -                                  
Data Expiration:                12/30/2017 18:01                   
Last Written:                   01/02/2008 18:01                   
Last Read:                      -                                  
Robot Type:                     NONE                               
Robot Control Host:             -                                  
Robot Number:                   -                                  
Slot:                           -                                  
Side/Face:                      -                                  
Cleanings Remaining:            -                                  
Number of Mounts:               7                                  
Maximum Mounts Allowed:         0                                  
Media Status:                   FULL MPX                           
Kilobytes:                      300968960                          
Images:                         38                                 
Valid Images:                   38                                 
Retention Period:               10                                 
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:                    vms-zv01                           
Server Group:                   NO_SHARING_GROUP                   
Upgrade Conflicts Flag:                                            
Pool Number:                    9                                  
Volume Pool:                    10Jahre                            
Previous Pool Name:             SCRATCH                            
Vault Flags:                    -                                  
Vault Container:                -                                  
Vault Name:                     -                                  
Vault Slot:                     -                                  
Session ID:                     -                                  
Date Vaulted:                   -                                  
Return Date:                    -                                  
====================================================================
Command completed successfully.
 

Dirk_Mueller
Level 5

There was a image on the tapes, but I have expired it.

bpmedialist doesn´t show any media for this tape, and the GUI/Catalog shows also no images

 

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Tape is FULL. 38 unexpired images on this tape that will only expire on 12/30/2017.

Curious to see output of 'bpmedialist -m ZP0758'.

Also check output of: 'bpimmedia -mediaid ZP0758'.

*** EDIT ***

There was a image on the tapes, but I have expired it.

Did you expire after running nbemmcmd command?
There were 38 images. Not just one.

Once you have expired this tape, it will no longer show up in bpmedialist.

Dirk_Mueller
Level 5

bpmedialist-output:

 

Server Host = vms-zv01

 id     rl  images   allocated        last updated      density  kbytes restores
           vimages   expiration       last read         <------- STATUS ------->
--------------------------------------------------------------------------------
ZP0758  10     38   01/02/2008 18:01  01/02/2008 18:01  hcart2   300968960     0
              MPX   12/30/2017 18:01        N/A         FULL

 

I have expired the images in the morning.

 

 

Dirk_Mueller
Level 5

how can I list the backupid´s of all backups of this tape?

 

I looked with GUI/Catalog - and there copy 1, 2 and 3 for this tape. From 1.1.1970 - today.

There are no images.

 

Is it possible that there are 38 fragments of expired backups on it?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

how can I list the backupid´s of all backups of this tape?

'bpimmedia -mediaid ZP0758'

What command did you use to expire tape/images?
Did you also run '
bpexpdate -deassignempty'?
The command is safe and will not expire/delete any valid, unexpired images.

 

You can see that NBU still sees 38 images with expiration date of  12/30/2017 18:01 .

 

 

Dirk_Mueller
Level 5

Now all Tapes are Scratch.

The bpmedialist returns with

"requested media id is not assigned to this host in the EMM database.

 

I think the bpmedialist showed only fragments, and now they have been deleted.

Is that possible?

Andy_Welburn
Level 6

Maybe one of the scheduled clean-ups has run in the meantime which has cleard down the fragments etc

(bpimage -cleanup/nbdelete -allvolumes/bpexpdate -deassignempty or something like!)

Dirk_Mueller
Level 5

what a shocking moment :(

 

Thanks all for your comments.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

It is quite possible if a normal 12-hourly Image Cleanup job ran in the meantime.

Or if someone has issued bpexpdate -deassignempty.

nbemmcmd command should now also have the Assign Time and all image references cleared.

Old_Remove
Level 4

Hello Dirk,

 

to see if a image is on the tape run bpimmedia -tape -mediaid xxxxxxL6. With this you see if any image is on the tape. bpexpdate -deasignempty will not deassign the media if any image or fragment is on the tape.

 

We see us (hopefully) tomorrow

Johannes