cancel
Showing results for 
Search instead for 
Did you mean: 

Delete backup image from Catalog

candelorom
Level 3

Good evening everyone and congratulations on the forum.
I am writing to ask you for support regarding the deletion of backup images.
I have deleted some backup images at the request of a client of mine. I did this, using the console and the Catalog. I searched for the images to be deleted, using the filters. I selected the images to delete, right-clicked and selected Expire (delete).
Now, if I run the command:

bpimagelist -idonly -d 01/01/19 00:00:00 -e 12/31/2019 23:59:59 -policy <policy_name> -U

I still see all the backup images.
I noticed that while deleting the images from the catalog, the log file wrote:

logparams: -Bidfile D: \ Program Files \ Veritas \ NetBackup \ Logs \ user_ops \ XXXXX \ XXXXX \ logs \ jbpF9A5.tmp -force -d 0 -M XXXXXXXXX -notimmediate

Is this why images are not deleted immediately? Due to the -notimmediate option?

It is the case to perform:

nbdelete -allvolumes -force

Or is nbdelete scheduled to run automatically together with bpimage -cleanup -allclients?

Thanks for your answers, but I didn't find anything about it in the forum.

1 ACCEPTED SOLUTION

Accepted Solutions

StoneRam-Simon
Level 6
Partner    VIP    Accredited Certified

Oracle backups have dependencies between the images, so if one image doesn't get deleted (even if the copies / fragments) associated with it are expired off, the image can't be deleted until the dependent images are also expired.

Normally you wouldn't be trying to expire images directly in NBU for Oracle..  You would want to instigate that in Oracle and then run a crosscheck to clean up the images Oracle identifies as no longer required.

The main difference between the GUI "Catalog" and the bpimagelist command, is that the GUI catalog will only shor results where there is still a copy/fragment associated with the image, where as the command line will only show ALL images including those that don't have fragments.

There are some "control" jobs for some backup types that create fragment-less images that will remain in the catalog until all the other images associated with them have expired.

bpexpdate should allow you to expire that image if you want to...  But the GUI won't as it has no "copies"

 

 

View solution in original post

11 REPLIES 11

StefanosM
Level 6
Partner    VIP    Accredited Certified

Please run the command bpimagelist -backupid <backupid> and share the output.
<backupid> is of course the backupid of the deleted image that you still see in bpimagelist.

The deletion of the backup from netbackup database is immediate. The -notimmediate in the command is to stop the deletion of the backup data from disk, for whatever reason you may want this. The most obvious is what manual mention

-notimmediate
Inhibits the call that bpexpdate makes to the nbdelete command after it expires an image on disk. If you intend to delete many images at the same time, use -notimmediate to avoid the overhead of multiple job creation for nbdelete to process. You can then run the nbdelete command later.

 

Thanks for your reply StefanoM.

This is the output:

Creator: oracle
Name1: (none specified)
Sched Label: sch-app.yea
Schedule Type: UBAK (2)
Retention Level: 3 years (10)
Backup Time: 06/01/2019 00:01:00 (1546729260)
Elapsed Time: 7794 second(s)
Expiration Time: 05/01/2022 00:01:00 (1641337260)
Maximum Expiration Time: 01/01/1970 01:00:00 (0)
Compressed: no
Client Encrypted: no
Kilobytes: 1621125408
Number of Files: 1
Number of Copies: 0
Number of Fragments: 0
Histogram: 0 0 0 0 0 0 0 0 0 0
DB Compressed: no
Files File Name: XXXXXXXXXXXXXXXXX_UBAK.f
Previous Backup Files File Name: (none specified)
Parent Backup Image File Name: (none specified)
SW Version: (none specified)
Options: 0x0
MPX: 0
TIR Info: 0
TIR Expiration: 01/01/1970 01:00:00 (0)
Keyword: oltpprod_3424427551
Ext Security Info: no
File Restore Raw: no
Image Dump Level: 0
File System Only: no
Object Descriptor: (none specified)
Previous BI Time: 01/01/1970 01:00:00 (0)
BI Full Time: 01/01/1970 01:00:00 (0)
Request Pid: 0
Backup Status: 0
Stream Number: 0
Backup Copy: Standard (0)
Files File size: 676
PFI type: 0
IMAGE_ATTRIBUTE: 0
Primary Copy: 1
Image Type: 0 (Regular)
Job ID: 5198293
Num Resumes: 0
Resume Expiration: 01/01/1970 01:00:00 (0)
Data Classification: Gold
Data_Classification_ID: B4DED1701AEC442FACA998430CC1D473
Storage Lifecycle Policy: slp-XXXXXXXXXXXXXXXXX_3year
Storage Lifecycle Policy Version: 5
STL_Completed: 3
Remote Expiration Time: 01/01/1970 01:00:00 (0)
Origin Master Server: (none specified)
Origin Master GUID: (none specified)
Snap Time: 01/01/1970 01:00:00 (0)
IR Enabled: no
Client Character Set: 1
Image On Hold: 0
Kilobytes Data Transferred: 0

Yes, I have read the meaning of the -notimmediate option. I just wanted to understand why the images are no longer visible in the NBU Catalog, while instead they result in the bpimagelist command.

Thanks in advance

StefanosM
Level 6
Partner    VIP    Accredited Certified

Ok.
This backup is configured to use SLP,.
The slp status is 3 and this means that is completed and you have x copies of the same backup.

When you delete a backup from the gui, netbackup deletes only the copy that is shown on the screen and not all the copies.

If you need to delete all the copies, you must Select and delete one by one all the copy numbers of the backup from the upper right Corner or, use the command line.

Hello StefanosM, and thank you for your availability.
I tried to carry out the operations you described, but without success. I am attaching the screenshot of the bpimagelist command and of the catalog in NBU.

I tried to select copy 1, copy 2, copy 3 from the Copies field, and click on Search Now, but the result in the catalog is always the same.

Thanks for the support

candelorom_2-1635149815993.png

 

candelorom_3-1635150071196.png

 

StefanosM
Level 6
Partner    VIP    Accredited Certified

find a backupid you want to delete and run the following commands.

  • bpimagelist -l -backupid <backupid>
  • bpexpdate -d 0 -backupid <backupid>
  • bpimagelist -l -backupid <backupid>

the bpimagelist with -l  not -L or -U

Ok, that's clear.
But in your experience, what is the reason why the images were not deleted using the NBU Catalog?

Thanks

candelorom_0-1635151629865.png

 

StefanosM
Level 6
Partner    VIP    Accredited Certified

Do not know.
This GUI function is always working. Had you start the netbackup GUI  with "run as administrator" ?

Sure, I've tried everything, but I can't explain why I deleted the images via the NBU catalog, but despite this, I still see the images via the bpimagelist command.
I hope someone reads this post and can give me an explanation. I am going crazy!

Thanks again StefanosM

StefanosM
Level 6
Partner    VIP    Accredited Certified

Open a case to veritas support.
I think that they will solve the mystery in minutes

StoneRam-Simon
Level 6
Partner    VIP    Accredited Certified

Oracle backups have dependencies between the images, so if one image doesn't get deleted (even if the copies / fragments) associated with it are expired off, the image can't be deleted until the dependent images are also expired.

Normally you wouldn't be trying to expire images directly in NBU for Oracle..  You would want to instigate that in Oracle and then run a crosscheck to clean up the images Oracle identifies as no longer required.

The main difference between the GUI "Catalog" and the bpimagelist command, is that the GUI catalog will only shor results where there is still a copy/fragment associated with the image, where as the command line will only show ALL images including those that don't have fragments.

There are some "control" jobs for some backup types that create fragment-less images that will remain in the catalog until all the other images associated with them have expired.

bpexpdate should allow you to expire that image if you want to...  But the GUI won't as it has no "copies"

 

 

Thank you very much StoneRam-Simon.
Now everything is clear. Thanks also to StefanosM for the support.