View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001404||bareos-core||[All Projects] director||public||2021-11-25 11:24||2021-11-29 10:52|
|Priority||high||Severity||major||Reproducibility||have not tried|
|Fixed in Version|
|Summary||0001404: prune deletes virtualfull job from volume although the retention period is not expired|
|Description||executing the command|
prune volume=Bilddaten-0408 yes
caused the virtualfull job, which was stored on this volume to be deleted, although the retention period of "9 months 6 days" was not expired. The volume was last written 1 day ago.
The bconsole output was:
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
The current Volume retention period is: 9 months 6 days
There are no more Jobs associated with Volume "Bilddaten-0408". Marking it purged.
|Tags||No tags attached.|
|how can I recover the deleted virtualfull job from the now purged volume?|
The bareos daemon sent this message:
25-Nov 11:00 bareos-dir JobId 0: Volume "Bilddaten-0408" has Volume Retention of 23846400 sec. and has 0 jobs that will be pruned
25-Nov 11:00 bareos-dir JobId 0: Pruning volume Bilddaten-0408: 0 Jobs have expired and can be pruned.
25-Nov 11:00 bareos-dir JobId 0: Volume "" contains no jobs after pruning.
What was the purpose of running prune volume=Bilddaten-0408 yes ?
If the media has not been used or truncated (depending of your configuration) you can still use bscan to reimport it inside the database.
the pool contains other volumes that were expired. My goal was to truncate the expired volumes to gain free disk space.
I ran the shell script
for f in `echo "list volumes pool=Bilddaten" | bconsole | grep Bilddaten- | cut -d '|' -f3`; do
echo "prune volume=$f yes" | bconsole;
to prune each volume in the pool.
But the prune command did not only prune the expired volumes but also all volumes that contained the virtualfull job.
My second step would have been to truncate the pruned volumes.
But since I did not execute the truncate I will try to restore the virtualfull job by using bscan as you suggested.