cancel
Showing results for 
Search instead for 
Did you mean: 

How to cleaning up stale catalog directories

Former_Mary_Kay
Level 4
I found some directories under /usr/openv/netbackup/db/images/ for some old clients that no longer exist.  When i try to search the catalog, they don't show as having any images associated with them.  I look in the one or two image files left behind in those directory, extract the image ID's from it, and try to run quarries on those image id's and basically get the same response that nothing is found.

How do I clean these up the right way?  do I just delete the directories and the few orphaned files that were left behind, or is there a command I should use to clean them up?  I'd prefer a command as I don't have direct access to delete them (have to ask the UNIX admin to do it for me).

Thanks,
1 ACCEPTED SOLUTION

Accepted Solutions

Former_Mary_Kay
Level 4

I was looking back 12 years (should cover the entire time the enviorment has been in operation), and our longest standard retention is only 7 years.

Yes the .f files exist.

more /usr/openv/netbackup/db/images/vgscsqlt07/1036000000/Test_SQL_Client_1036185781_UBAK
. . .
FRAGMENT 1 1 1376 0 0 0 0 C:\nbu_stu\vgscsqlt07_1036185781_C1_F1 w2mkdsql07 65536 0 0 0 0 *NULL* 0 0 0 0 0 0 0 0 0 0
BACKUP_ID vgscsqlt07_1036185781
. . .
bpdbm -ctime 1036185781
1036185781 = Fri Nov  1 15:23:01 2002
. . .
bpimagelist -backupid vgscsqlt07_1036185781 -d 10/30/2002 -e 11/02/2002 -U
no entity was found
. . .
sudo bpimagelist -client vgscsqlt07 -d 10/30/2002 -e 11/02/2002 -U
no entity was found
I'll check out the TechNotes and see if one of them applies


Update from looking at the TechNotes:
bpimage -deletecopy 1 -backupid vgscsqlt07_1036185781
EXIT status = no entity was found (227)

bpexpdate -backupid vgscsqlt07_1036185781 -d 0
Are you SURE you want to delete vgscsqlt07_1036185781 y/n (n)? y
invalid error number
Looks like my final options is from http://support.veritas.com/docs/329188
The files for the image can also be manually removed by first shutting down NetBackup on the master server and then locating and moving/removing the files.  Care should be taken to locate all of the files that comprise the image by searching the entire image directory tree that contains the image.
I guess I'll have to wait until our next scheduled maintainance to do it properly based on this.

View solution in original post

2 REPLIES 2

Marianne
Level 6
Partner    VIP    Accredited Certified
How far are you going back when browsing or querying the image catalog?

Also, can you see that each image has a header and .f (files) file? (.f might be in catstore folder - http://seer.entsupport.symantec.com/docs/283306.htm )

Look at the 10-digit timestamp in the image number, then use the following command to get the date of the backup:

bpdbm -ctime 1000000000
1000000000 = Sun Sep 09 03:46:40 2001

So, if you run commands that include this date, you should get some output:

bpimagelist -client <client_name> -d 09/01/2001 -e 08/01/2010 -U

To expire, run
bpexpdate -backupid <client name>_<10 digit unix ctime>-d 0


There are also TechNotes on how to cleanup corrupt/bad image files:
http://seer.entsupport.symantec.com/docs/291020.htm
http://seer.entsupport.symantec.com/docs/329188.htm
http://seer.entsupport.symantec.com/docs/229602.htm
http://seer.entsupport.symantec.com/docs/304507.htm


Former_Mary_Kay
Level 4

I was looking back 12 years (should cover the entire time the enviorment has been in operation), and our longest standard retention is only 7 years.

Yes the .f files exist.

more /usr/openv/netbackup/db/images/vgscsqlt07/1036000000/Test_SQL_Client_1036185781_UBAK
. . .
FRAGMENT 1 1 1376 0 0 0 0 C:\nbu_stu\vgscsqlt07_1036185781_C1_F1 w2mkdsql07 65536 0 0 0 0 *NULL* 0 0 0 0 0 0 0 0 0 0
BACKUP_ID vgscsqlt07_1036185781
. . .
bpdbm -ctime 1036185781
1036185781 = Fri Nov  1 15:23:01 2002
. . .
bpimagelist -backupid vgscsqlt07_1036185781 -d 10/30/2002 -e 11/02/2002 -U
no entity was found
. . .
sudo bpimagelist -client vgscsqlt07 -d 10/30/2002 -e 11/02/2002 -U
no entity was found
I'll check out the TechNotes and see if one of them applies


Update from looking at the TechNotes:
bpimage -deletecopy 1 -backupid vgscsqlt07_1036185781
EXIT status = no entity was found (227)

bpexpdate -backupid vgscsqlt07_1036185781 -d 0
Are you SURE you want to delete vgscsqlt07_1036185781 y/n (n)? y
invalid error number
Looks like my final options is from http://support.veritas.com/docs/329188
The files for the image can also be manually removed by first shutting down NetBackup on the master server and then locating and moving/removing the files.  Care should be taken to locate all of the files that comprise the image by searching the entire image directory tree that contains the image.
I guess I'll have to wait until our next scheduled maintainance to do it properly based on this.