If for any reason it is necessary to completely delete entries from Bacula backups, the following bconsole commands can be executed (version reference 12.x Enterprise / 11.x Community):
Bacula Client’s Backups
purge jobs client=<client_name> delete client=<client_name>
VMs and Containers Plugin’s Backups
delete jobid=x,y,z
If you have a lot of Jobs to delete, it may be more practical to use the script: <jdelete>
Just unzip and run. Example:
cd /opt/bacula/scripts/ wget https://www.bacula.lat/wp-content/uploads/2020/08/jdelete.zip unzip jdelete.zip /opt/bacula/scripts/jdelete
You will be invited to enter the Job’s nine, validate all jobs selected by the query and proceed with the deletion, or not:
[root@enterprisebacula scripts]# /opt/bacula/scripts/jdelete.sh Job Name for Deletion: MySQLplugin |3112|MySQLplugin|2020-08-1310:02:01|B|D|11|552988|T| |3126|MySQLplugin|2020-08-1423:00:02|B|D|11|552989|T| |3140|MySQLplugin|2020-08-1710:02:01|B|D|11|552989|T| |3154|MySQLplugin|2020-08-1810:02:02|B|D|11|552989|T| |3170|MySQLplugin|2020-08-1910:02:01|B|D|11|552989|T| |3187|MySQLplugin|2020-08-2010:02:01|B|D|11|552989|T| |3206|MySQLplugin|2020-08-2123:00:00|B|D|11|552989|T| |3224|MySQLplugin|2020-08-2410:02:01|B|D|11|552989|T| |3240|MySQLplugin|2020-08-2510:02:01|B|D|11|552989|T| |3256|MySQLplugin|2020-08-2610:02:11|B|D|11|552989|T| |3272|MySQLplugin||B|D|0|0|C| Do you wish to remove these Jobs [yn]y
PS: it is necessary that the settings of the deleted objects are first deleted from the Director’s Configuration, if any.
The commands delete only metadata from the Bacula Catalog. The volume and storage data elimination will be done according to its type, characteristics and defined retentions. For example, a tape can be recycled if all of the Jobs it contains have their backups deleted by this procedure.
Disponível em: Português (Portuguese (Brazil))EnglishEspañol (Spanish)