View Issue Details

IDProjectCategoryView StatusLast Update
0000938bareos-coreGeneralpublic2023-04-14 11:46
ReporterIvanBayan Assigned Tobruno-at-bareos  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Product Version17.2.4 
Summary0000938: Bareos doesn't truncate purged volumes
DescriptionBareos doesn't truncate purged volumes.
Steps To Reproduce*list jobid=808
+-------+---------------------+-----------------+---------------------+------+-------+----------+---------------+-----------+
| jobid | name | client | starttime | type | level | jobfiles | jobbytes | jobstatus |
+-------+---------------------+-----------------+---------------------+------+-------+----------+---------------+-----------+
| 808 | mia-backup03_bareos | mia-backup03-fd | 2017-11-11 21:01:23 | B | D | 2,775 | 1,938,747,722 | T |
+-------+---------------------+-----------------+---------------------+------+-------+----------+---------------+-----------+

*list volumes jobid=808
Jobid 808 used 1 Volume(s): mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04

*purge volume=mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04

This command can be DANGEROUS!!!

It purges (deletes) all Files from a Job,
JobId, Client or Volume; or it purges (deletes)
all Jobs from a Client or Volume without regard
to retention periods. Normally you should use the
PRUNE command, which respects retention periods.
This command requires full access to all resources.
1 File on Volume "mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04" purged from catalog.
There are no more Jobs associated with Volume "mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04". Marking it purged.

*llist volume=mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04
          mediaid: 1,371
       volumename: mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04
             slot: 0
           poolid: 14
        mediatype: File_mia-backup03_storage03
     firstwritten: 2017-11-11 21:01:23
      lastwritten: 2017-11-11 21:01:46
        labeldate: 2017-11-11 21:01:23
          voljobs: 1
         volfiles: 0
        volblocks: 30,082
        volmounts: 1
         volbytes: 1,940,590,529
        volerrors: 0
        volwrites: 30,083
 volcapacitybytes: 0
        volstatus: Purged
          enabled: 1
          recycle: 0
     volretention: 5,184,000
   voluseduration: 0
       maxvoljobs: 1
      maxvolfiles: 0
      maxvolbytes: 10,737,418,240
        inchanger: 0
          endfile: 0
         endblock: 1,940,590,528
        labeltype: 0
        storageid: 5
         deviceid: 0
       locationid: 0
     recyclecount: 0
     initialwrite:
    scratchpoolid: 0
    recyclepoolid: 0
          comment:
          storage: mia-backup03_storage03-sd

*truncate volstatus=Purged
Using Catalog "MyCatalog"
No results to list.
*llist volume=mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04
Using Catalog "MyCatalog"
          mediaid: 1,371
       volumename: mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04
             slot: 0
           poolid: 14
        mediatype: File_mia-backup03_storage03
     firstwritten: 2017-11-11 21:01:23
      lastwritten: 2017-11-11 21:01:46
        labeldate: 2017-11-11 21:01:23
          voljobs: 1
         volfiles: 0
        volblocks: 30,082
        volmounts: 1
         volbytes: 1,940,590,529
        volerrors: 0
        volwrites: 30,083
 volcapacitybytes: 0
        volstatus: Purged
          enabled: 1
          recycle: 0
     volretention: 5,184,000
   voluseduration: 0
       maxvoljobs: 1
      maxvolfiles: 0
      maxvolbytes: 10,737,418,240
        inchanger: 0
          endfile: 0
         endblock: 1,940,590,528
        labeltype: 0
        storageid: 5
         deviceid: 0
       locationid: 0
     recyclecount: 0
     initialwrite:
    scratchpoolid: 0
    recyclepoolid: 0
          comment:
          storage: mia-backup03_storage03-sd
Additional Information*llist pool=mia-backup03_mixed_differential
          poolid: 14
            name: mia-backup03_mixed_differential
         numvols: 5
         maxvols: 0
         useonce: 0
      usecatalog: 1
 acceptanyvolume: 0
    volretention: 5,184,000
  voluseduration: 0
      maxvoljobs: 1
     maxvolbytes: 10,737,418,240
       autoprune: 1
         recycle: 0
        pooltype: Backup
     labelformat: ${Client}-${Pool}-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${JobId}-${NumVols:p/2/0/r}
         enabled: 1
   scratchpoolid: 0
   recyclepoolid: 0
       labeltype: 0

*llist volume=mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04
          mediaid: 1,371
       volumename: mia-backup03-fd-mia-backup03_mixed_differential-20171111-808-04
             slot: 0
           poolid: 14
        mediatype: File_mia-backup03_storage03
     firstwritten: 2017-11-11 21:01:23
      lastwritten: 2017-11-11 21:01:46
        labeldate: 2017-11-11 21:01:23
          voljobs: 1
         volfiles: 0
        volblocks: 30,082
        volmounts: 1
         volbytes: 1,940,590,529
        volerrors: 0
        volwrites: 30,083
 volcapacitybytes: 0
        volstatus: Used
          enabled: 1
          recycle: 0
     volretention: 5,184,000
   voluseduration: 0
       maxvoljobs: 1
      maxvolfiles: 0
      maxvolbytes: 10,737,418,240
        inchanger: 0
          endfile: 0
         endblock: 1,940,590,528
        labeltype: 0
        storageid: 5
         deviceid: 0
       locationid: 0
     recyclecount: 0
     initialwrite:
    scratchpoolid: 0
    recyclepoolid: 0
          comment:
          storage: mia-backup03_storage03-sd

*show pool=mia-backup03_mixed_differential
Pool {
  Name = "mia-backup03_mixed_differential"
  PoolType = Backup
  LabelFormat = "${Client}-${Pool}-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${JobId}-${NumVols:p/2/0/r}"
  LabelType = "bareos"
  ActionOnPurge = Truncate
  MaximumVolumeJobs = 1
  MaximumVolumeBytes = 10 g
  VolumeRetention = 2 months
  Storage = "mia-backup03_storage03-sd"
  Recycle = no
}

TagsNo tags attached.

Activities

bruno-at-bareos

bruno-at-bareos

2023-03-23 16:48

manager   ~0004952

Is this still reproducible with current code (Bareos >21) ?

Truncate on Purge work as documented on latest code and test.
bruno-at-bareos

bruno-at-bareos

2023-04-14 11:46

manager   ~0004968

Fixed working >21 as documented

Issue History

Date Modified Username Field Change
2018-04-18 15:28 IvanBayan New Issue
2023-03-23 16:48 bruno-at-bareos Assigned To => bruno-at-bareos
2023-03-23 16:48 bruno-at-bareos Status new => feedback
2023-03-23 16:48 bruno-at-bareos Note Added: 0004952
2023-04-14 11:46 bruno-at-bareos Status feedback => closed
2023-04-14 11:46 bruno-at-bareos Resolution open => fixed
2023-04-14 11:46 bruno-at-bareos Note Added: 0004968