On 4/11/23 16:35, Chris Wilkinson wrote:
I have some disk volumes that are not associated with any job but have not yet reached their expiry time so they are not being pruned. These were created by a job run that was deleted. It seems deleting a job run doesn't purge the associated volumes.I would like to delete these now obsolete volumes from disk and recover the space used. I thought the prune command would do this but it doesn't find the obsolete volumes, presumably because they haven't reached their expiry time. I thought perhaps the bls -j <pathtovolume> utility might help but it is extremely slow and produces much unwanted output that is difficult to parse out. How could I list these obsolete volumes so I could script a delete from catalog and rm the volume files? Thanks Chris Wilkinson
Hello Chris, Bacula does its best to not delete tings, especially volumes/backup data. The rare case being the `ActionOnPurge = truncate` f eature. The answer in your case is simple: In bconsole: * delete yes volume=xxxx Then in a shell: # rm -f /path/to/filevolume This can be done with a simple script too (standard warnings apply): ----8<---- #!/bin/bash bcbin=/path/to/bconsole bccfg=/path/to/bconsole.conf path2vols=/path/to/file/vols For vol in vol_1 vol_2 vol_3; do echo "delete yes volume="${vol}" | "${bcbin}" -c "${bccfg}" rm -f "$path2vols}"/"${vol} done ----8<---- To be sure there are no jobs associated with a volume, I would recommend to use the bconsole `query` command, then choose option `14: List Jobs stored for a given Volume name`, and then do the deletions after you are sure all is OK. Hope this helps, Bill -- Bill Arlofski w...@protonmail.com
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users