Bacula-users

[Bacula-users] Volume truncation not working

2011-01-16 09:24:33
Subject: [Bacula-users] Volume truncation not working
From: "Rick Koshi" <bacula-users AT more-right-rudder DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Sun, 16 Jan 2011 09:21:12 -0500
Hi all,

I'm running Bacula 5.0.3 on ArchLinux 64-bit with mysql 5.1, backing up
to disk volumes.

I've purged a number of volumes using commands like "purge volume=Vol-0008".
The problem is that the files on disk are not getting truncated.  I've tried
both commands I saw in the manual for this purpose:
    purge volume action=truncate storage=File allpools
    purge volume action=all allpools storage=File
They both appear to run, but don't do anything.

The first time I tried this procedure, it worked without a hitch.
I purged the volumes and ran the first of the above two commands,
and it gave me a bunch of output like this:
    *purge volume action=truncate storage=File allpools

    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.
    Connecting to Storage daemon File at hope.more-right-rudder.com:9103 ...
    3000 OK label. VolBytes=186 DVD=0 Volume="TempVol-0084" 
Device="FileStorage" (/backup/tapes)
    The volume "TempVol-0084" has been truncated
    3000 OK label. VolBytes=182 DVD=0 Volume="Vol-0086" Device="FileStorage" 
(/backup/tapes)
    The volume "Vol-0086" has been truncated
    3000 OK label. VolBytes=182 DVD=0 Volume="Vol-0087" Device="FileStorage" 
(/backup/tapes)
    The volume "Vol-0087" has been truncated
    [ ... ]

Looking on the disk, all those volumes were nice and small (182 bytes each)
and I went about my business thinking all my problems were solved.

Now, however, I've purged a number of additional volumes, and when I try
to get them truncated, I get the following output:
    *purge volume action=truncate storage=File allpools

    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.
    Connecting to Storage daemon File at hope.more-right-rudder.com:9103 ...
    *purge volume action=all allpools storage=File
    
    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.
    Using Catalog "MyCatalog"
    Connecting to Storage daemon File at hope.more-right-rudder.com:9103 ...
    *

Note the lack of any actions taken.  The volumes on disk are still the same
(large-ish) size.  I've tried restarting the daemons, with no effect.

The volume status is listed as "purged" for all these volumes, as I'd expect.
The pool configuration looks like this:
  Pool {
    Name = File
    Pool Type = Backup
    Recycle = yes
    AutoPrune = yes
    Volume Retention = 80 days
    Maximum Volume Bytes = 50G
    Maximum Volume Jobs = 1
    LabelFormat = "Vol-"
    Action On Purge = Truncate
  }

Here's an example volume:
    *llist volume=Vol-0008
              MediaId: 8
           VolumeName: Vol-0008
                 Slot: 0
               PoolId: 2
            MediaType: File
         FirstWritten: 2010-12-07 23:16:39
          LastWritten: 2010-12-07 23:19:42
            LabelDate: 2010-12-07 23:16:39
              VolJobs: 1
             VolFiles: 0
            VolBlocks: 0
            VolMounts: 3
             VolBytes: 84,373,080
            VolErrors: 0
            VolWrites: 84,531
     VolCapacityBytes: 0
            VolStatus: Purged
              Enabled: 1
              Recycle: 1
         VolRetention: 2,592,000
       VolUseDuration: 0
           MaxVolJobs: 1
          MaxVolFiles: 0
          MaxVolBytes: 5,368,709,120
            InChanger: 0
              EndFile: 0
             EndBlock: 84,420,195
             VolParts: 0
            LabelType: 0
            StorageId: 1
             DeviceId: 0
           LocationId: 0
         RecycleCount: 1
         InitialWrite: 0000-00-00 00:00:00
        ScratchPoolId: 0
        RecyclePoolId: 0
              Comment: NULL

And the director's concept of the pool, if it matters:
    *llist pool=File
              PoolId: 2
                Name: File
             NumVols: 96
             MaxVols: 0
             UseOnce: 0
          UseCatalog: 1
     AcceptAnyVolume: 0
        VolRetention: 6,912,000
      VolUseDuration: 0
          MaxVolJobs: 1
         MaxVolBytes: 53,687,091,200
           AutoPrune: 1
             Recycle: 1
            PoolType: Backup
         LabelFormat: Vol-
             Enabled: 1
       ScratchPoolId: 0
       RecyclePoolId: 0
           LabelType: 0
    *show pool=File
    Pool: name=File PoolType=Backup
          use_cat=1 use_once=0 cat_files=1
          max_vols=0 auto_prune=1 VolRetention=2 months 20 days 
          VolUse=0 secs recycle=1 LabelFormat=Vol-
          CleaningPrefix=*None* LabelType=0
          RecyleOldest=0 PurgeOldest=0 ActionOnPurge=1
          MaxVolJobs=1 MaxVolFiles=0 MaxVolBytes=53687091200
          MigTime=0 secs MigHiBytes=0 MigLoBytes=0
          JobRetention=0 secs FileRetention=0 secs

Does anyone have any ideas why this isn't working?

Thanks in advance for any help.

    -- Koshi

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>