cancel
Showing results for 
Search instead for 
Did you mean: 

PostgreSQL Agent - Deleting backups on the media

Cr13
Level 3

Hello all,

We want to delete backups from the agent.

We have seen that the command "nbpgsql -o delete" exists. However as specified in the documentation, the backups are not deleted from the media. ("The nbpgsql -o delete command deletes the backup information from the NetBackup catalog files, but retains the backups in the storage media.")

How can we delete the backups from the catalog AND the media?

Thanks in advance for your feedback.

Sincerely

3 REPLIES 3

quebek
Moderator
Moderator
   VIP    Certified

Hello

Depending on your storage media - if it is on tape it is almost undoable - until you will duplicate all other images existing on the same piece of media to other and then expire the needed media ID. If it's on disk then with next catalog image cleanup it should be deleted.

If it is tape media be really careful with expiring it as you might expire way too much... now-a-days tapes can hold a lot of data.

Nicolai
Moderator
Moderator
Partner    VIP   

You can't delete data on tape media, unless you move all active backup to other tapes and overwrite the existing one. In other words, it is a massive work. Remember tape is a sequential media, not random access.

When it comes to deletion of data, there is logical and physical deletion.

Logical deletion is for most use cases sufficient, if neither Postgress or Netbackup knows where the data is, it is as good as gone. Restoring access to data will be on the theoretically level and require non-trivial efforts.

Physical deletion is where the media itself is destroyed or media is overwritten.

Unless there are really special circumstance, logical deletion is usually enough.

wish there'd be command  usage of dd on tapes as well like dd <media id>.. or something on those lines