Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Netbackup does not clean expired images

Created: 10 Feb 2012 • Updated: 13 Feb 2012 | 11 comments
This issue has been solved. See solution.

 

Hello everyone.

 

We have Netbackup 7.0  installed on Redhat 5.5. For this moment we are only using NB to perform Oracle database backups. The everyday backup works good but we have problem with removing expired images. I have retention set to 1 week but I have images older than 2 week. At first the image cleanup did not start itself than I tried this http://www.symantec.com/business/support/index?page=content&id=TECH125429 and now I can see cleanup job running automatically in activity monitor, but it doesn't delete the expired ones I guess for some reasons cleanup job thinks it's not expired. 

 

02/10/2012 15:50:36 - Info bpdbm (pid=4078) image catalog cleanup
02/10/2012 15:50:36 - Info bpdbm (pid=4078) Cleaning up tables in the relational database
02/10/2012 15:50:36 - Info bpdbm (pid=4078) deleting images which expire before Fri Feb 10 15:50:36 2012 (1328874636)
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test1
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test2
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test3
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test4
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test5
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test6
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test7
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test8
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test9
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test10
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test11
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test12
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test13
02/10/2012 15:50:36 - Info bpdbm (pid=4078) processing client test14
02/10/2012 15:50:36 - Info bpdbm (pid=4078) deleted 0 expired records, compressed 0, tir removed 0, deleted 0 expired copies
the requested operation was successfully completed  (0)
 
This particular log created when I manually initiate image cleanup job (/usr/openv/netbackup/bin/admincmd/bpimage -cleanup -allclients) I just did it and I have 8 days of backup for now.  Can someone tell me how can I see the list of backups that netbackup considers that It's expired ?
 
Thanks for you'r time
 
P.s  I will provide additional information If necessary 

Comments 11 CommentsJump to latest comment

Marianne's picture

Sure your retention is set to 1 week? The retention level for the Default-Application-Backup is used for the image retention, not Automatic Backup Schedule.

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

SOLUTION
freax's picture

Thanks for your replay, Actually I thought Full was for backup retention. I checked the Default-Application-Backup and I had one month there now I changed it to one week and run the image cleanup (/usr/openv/netbackup/bin/admincmd/bpimage -cleanup -allclients)  again, but still I have backup images from 2 Feb. to 12 Feb.  Does it need 1 week to take effect ?  

Mark_Solutions's picture

It could be this one - so worth upgrading to 7.0.1 (or better still 7.1.0.3):

From the 7.0.1 Release Notes:

Associated Primary Etrack: 2016865
■ TITAN cases: 411-696-095
■ Contained in: NBLU_7.0.1.UNIX NBLU_7.0.1.WIN NB_7.0.1 NB_7.0.1.winnt.IA64
NB_7.0.1.winnt.x64 NB_7.0.1.winnt.x86 NB_CLT_7.0.1
■ Description:
If ExpMgr failed, the disk cleanup would not run again for a Disk Staging Storage
Unit (DSSU). This issue caused the jobs to hang.

A 7 day retention would generally not have images older than 8 days left (caused by the cleanup interval in NetBackup itself)

For a quick disk cleanup run:

nbdelete -allvolumes -force

Hope this helps - primary advice is to patch or upgrade

#edit# excellent advice from Marianne about the retention period

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

freax's picture

 

nbdelete -allvolumes -force  Does this command delete unexpired images too ?  

mph999's picture

Not quite, this command actually deletes the fragments off the disk ..., the is the actual storage unit.

" 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.
"
 
Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
freax's picture

As I know (correct me if wrong) every single backup has its own retention information according to Default-application-backup  what if i change it ?  Does this means that old backups with different retention information will be updated or it will only take effect to new backup images ?

Also there is retention in Policy>>Schedules>>Full  What this retention period is used for ? 

Mark_Solutions's picture

Each backup has a retention period set at the time of the backup

If you change the retention of the default-application schedule now it will not change the retention of previous backups

If you do want to change those you can use bpexpdate to change their expiry date

The nbdelete -allvolumes -force only deletes expired fragments - it will not delete all of your valid disk images - I know the command  sounds scary but it is an image cleanup for disk backups

Hope this helps

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

Marianne's picture

Is this your problem? You expected the Automatic Backup schedule retention to be applied and did not realize that Application Backup schedule retention will be applied?

Explanation from  Oracle Admin Guide UNIX,Linux  http://www.symantec.com/docs/TECH127053 :

Application Backup
The retention period for an Application Backup schedule refers to the length of time that
NetBackup keeps backup images (stream-based backups).
 

Automatic Backup
The retention period for an automatic schedule controls how long NetBackup keeps records of when scheduled backups
occurred (proxy backups).

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

freax's picture

Mark_Solutions    I did /usr/openv/netbackup/bin/admincmd/bpexpdate -recalculate   and than run a command /usr/openv/netbackup/bin/admincmd/bpimage -cleanup -allclients  now I have backups from 6 feb to 12.   thanks :)  

Marianne van den Berg  Yes I did not use Default application backup retention. :) 

Marianne's picture

So, life is good and NBU does what it is supposed to do?

Please select the post that helped you most and Mark As Solution.

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