Hi,

I may have misunderstood recycling or the different retention periods. So I
need some clarification.

At the moment I'm looking for the reason why a volume in my Differential pool
wasn't recycled and a volume from the Scratch pool was used.

What I want:

* daily incr. backups to the Incremantal pool
 * volume can be wiped after 14 days -> volume retention 14 days
 
* weekly diff. backups to the Differential pool
 * volume can be wiped after 31 days -> volume retention 31 days
 
* monthly full backups to the Full pool
 * volume can be wiped after 180 days -> volume retention 180 days


I've set the following for the client:

  File Retention = 90 days
  Job Retention = 6 months

And the different volume retention periods above.


The short question is: what prevents volume 06D125L (more details below) from
being recycled?  

Does File or Job retention periods which are larger than the Volume retention
period prevent recycling?



My understanding of the different retention periods an recycling is:

* the shortest retention period defines if a volume can be recycled
  -> example: a volume in the Differential pool can be recycled and reused if
     its state is Used and the first written date is older than 31 days (volume
     retention period of that pool). It doesn't matter if 'File Retention' or
     'Job Retention' is set to more than 31 days.


Some parts of the manual, which makes me think I'm right:

http://www.bacula.org/rel-manual/Configuring_Director.html#SECTION0014130000000000000000
| File records may actually be retained for a shorter period than you specify
| on this directive if you specify either a shorter Job Retention or a
| shorter Volume Retention period. The shortest retention period of the three
| takes precedence.

http://www.bacula.org/rel-manual/Automatic_Volume_Recycling.html
# If the request is for an Autochanger device, look only for Volumes in the
Autochanger (i.e. with InChanger set and that have the correct Storage device).
# Search the Pool for a Volume with VolStatus=Append (if there is more than
one, the Volume with the oldest date last written is chosen. If two have the
same date then the one with the lowest MediaId is chosen).
# Search the Pool for a Volume with VolStatus=Recycle and the InChanger flag is
set true (if there is more than one, the Volume with the oldest date last
written is chosen. If two have the same date then the one with the lowest
MediaId is chosen).
# Try recycling any purged Volumes.
----> # Prune volumes applying Volume retention period (Volumes with VolStatus 
Full,
Used, or Append are pruned). Note, even if all the File and Job records are
pruned from a Volume, the Volume will not be marked Purged until the Volume
retention period expires. 



Now there is volume 06D125L3, which I think sould be recycled.


Pool: Differential
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| mediaid | volumename | volstatus | enabled | volbytes       | volfiles | 
volretention | recycle | slot | inchanger | mediatype | lastwritten         |
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|       6 | 06D125L3   | Used      |       1 |  9,816,468,480 |       11 |    
2,678,400 |       1 |    6 |         1 | LTO3      | 2007-10-14 00:25:18 |



There is a job record (BackupCatalog) on that volume that is a Full backup the
other two are differential backups.

Enter Volume name: 06D125L3
+-------+---------------+---------------------+------+-------+-------+---------------+--------+
| jobid | name          | starttime           | type | level | files | bytes    
     | status |
+-------+---------------+---------------------+------+-------+-------+---------------+--------+
|   743 | SMTCZB0003    | 2007-10-14 00:07:06 | B    | D     | 7,241 | 
1,195,019,960 | T      |
|   744 | VU0EM003      | 2007-10-14 00:13:38 | B    | D     | 6,467 | 
7,716,783,290 | T      |
|   745 | BackupCatalog | 2007-10-14 00:25:03 | B    | F     |     1 |   
894,160,054 | T      |
+-------+---------------+---------------------+------+-------+-------+---------------+--------+


Instead of recycling this volume a fresh volume from the Scratch pool was used.



Here are some config details.

client config:

Client {
  Name = VU0EM003
  Address = 10.60.1.252
  FDPort = 9102
  Catalog = MyCatalog
  Password = "wiped"
  File Retention = 90 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}


pool config:

Pool {
  Name = Full
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Recycle Oldest Volume = yes
  Volume Use Duration = 96 hours
  Volume Retention = 180 days
}

#
# differential pool
#

Pool {
  Name = Differential
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Recycle Oldest Volume = yes
  Volume Use Duration = 96 hours
  Volume Retention = 31 days
}

#
# incremental pool
#
Pool {
  Name = Incremental
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Recycle Oldest Volume = yes
  Volume Retention =  14 days
}

schedule client backup:

Schedule {
  Name = "Regular Backup VU0EM003"
  Run = Level=Full Pool=Full 1st sun at 00:06
  Run = Level=Differential Pool=Differential FullPool=Full 2nd-5th sun at 00:06
  Run = Level=Incremental Pool=Incremental DifferentialPool=Differential 
FullPool=Full tue-sat at 00:06
}

schedule database backup:

Schedule {
  Name = "Database Backup"
  Run = Level=Full Pool=Full 1st sun at 0:07
  Run = Level=Full Pool=Differential 2nd-5th sun at 00:07
}


Ralf

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to