Video Screencast Help


Created: 27 Sep 2012 • Updated: 28 Sep 2012 | 12 comments
This issue has been solved. See solution.

The nbdelete command removes all deleted fragments from the disk volumes that are specified on the command line. The -allvolumes option removes the fragments from all volumes that contain deleted fragments. The -dt-media_id-media_server, and -storage_server options specify an individual volume where deleted fragments should be removed.

What this deleted fragments means?

Comments 12 CommentsJump to latest comment

Marianne's picture


Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

revarooo's picture

LOL Marianne. Arun K, you should really utilize google, it's great!

nbdelete basically when a image expires, it doesn't automatically deleted the area where the backups were sent (tape or disk).

Images in the netbackup database have an I and F in the header file (I=image F=fragment -  (F = pointers to the data you backed up, that can be disk or tape)).

Remember, its a pointer. The actual data files are on disk on your storage unit. So something needs to come along and clean them up when the image is expired. That's what nbdelete does in a nutshell.

We don't do this with tape. When all images have expired on tape, the tape is ready to be reused and NetBackup justs overwrites the data on tape the nex time that tape is used for a backup.

Make sense? 

revarooo's picture

There is more to it than that, but thats a basic explanation of nbdelete.

CRZ's picture

Hmmm, quoted documentation followed by "What this means?"  I certainly haven't seen this tactic posted in this forum before! | APPLBN | 761LBN

Arun K's picture


  1. What happens in case of disk?
  2. nbdelete is a manual command?
  3. does NBU runs it periodically?
mph999's picture

1.  Read the first post you submitted, the answer is there.

2/3.  Fair enough question - nbdelete is run automatically, though it can be run manually.  However, it should not be run unless you have an issue and know exactly why you need to run it.


Regards,  Martin
Setting Logs in NetBackup:
Arun K's picture
  1. SO NBU runs this periodically on its own?
  2. does a job appears for this?
mph999's picture

1. I answered this.

"nbdelete is run automatically"

You really need to try and read the answers given, becasue in the same post you ask the same question multiple times.

2.  It appears as an image cleanup if run manually.  It is also included in the 12 hr cleanup NBU runs.

Regards,  Martin
Setting Logs in NetBackup:
revarooo's picture

Arun, why did you remove the solution? It was given?

Yes NetBackup runs it as part of image cleanup. Do you see image cleanup jobs? Go take a look.

Bob Insko's picture

Keep in mind that expiration of Disk images is a two part process.

bpexpdate will detect that the image has past it's expiration time (or can be run manually).  If bpexpdate encounters a Disk Image, it will record the fragments of that image that exist on disk in EMM and they will be marked "To be deleted".  bpexpdate will then delete the header and .f file from the image directory.

Later, nbdelete will run.  It will examine the appropriate EMM tables looking for fragments to actually delete from disk.  The appropriate media server will be contacted and bpdm on that media server will actually delete the fragment from disk.  If the media server cannot be contacted, or if the media server can't access the Disk STU, then the entry will remain in the EMM table so that an attempt to delete it can be completed on the next run of nbdelete. 

Both of these jobs show up in the Activity Monitor as an Image Cleanup job.  Looking at the Job Details will show if a particular Image Cleanup job is a bpexpdate job, an nbdelete job, or both.

nbdelete does not really "detect" expired images.  It only deletes fragments on images that were previously deleted by bpexpdate.

One VERY DANGEROUS flag on nbdelete is the -force flag.  What that flag does is make THIS run of nbdelete attempt to delete the disk fragment from disk, but if that attempt fails because the media server is not available, or the media server can't access the disk STU (the disk STU is not currently mounted, for example), then even though the ATTEMPT to delete the disk fragment from disk FAILED, the entry in the EMM table will be deleted.  This means that if that media server comes back, or the disk STU is again available, no further attempts will be made by NetBackup to delete that fragment from disk by any automated means.  This would "orphan" (i.e.. abandon) that disk fragment on the disk STU where those files are just "taking up space" forever unless some other action is taken to delete them.

mph999's picture

Hey Bob,

Welcome to the forum, and thank you for making the excellent post above.


Regards,  Martin
Setting Logs in NetBackup: