View Issue Details

IDProjectCategoryView StatusLast Update
0001404bareos-core[All Projects] directorpublic2021-11-29 10:52
ReporterIntAssigned To 
PriorityhighSeveritymajorReproducibilityhave not tried
Status newResolutionopen 
PlatformLinuxOSCentOSOS Version7
Product Version19.2.11 
Fixed in Version 
Summary0001404: prune deletes virtualfull job from volume although the retention period is not expired
Descriptionexecuting 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.
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action




2021-11-25 11:32

reporter   ~0004361

how can I recover the deleted virtualfull job from the now purged volume?


2021-11-25 11:41

reporter   ~0004362

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.


2021-11-25 18:48

developer   ~0004363

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.


2021-11-29 10:52

reporter   ~0004371

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.

Issue History

Date Modified Username Field Change
2021-11-25 11:24 Int New Issue
2021-11-25 11:32 Int Note Added: 0004361
2021-11-25 11:41 Int Note Added: 0004362
2021-11-25 18:48 bruno-at-bareos Note Added: 0004363
2021-11-29 10:52 Int Note Added: 0004371