Bacula-users

[Bacula-users] How to disable Auto Pruning of Jobs older than 6 months.

2011-05-31 07:38:10
Subject: [Bacula-users] How to disable Auto Pruning of Jobs older than 6 months.
From: "Rodrigo Ferraz" <rofz55 AT gmail DOT com>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 31 May 2011 08:34:34 -0300
Hello

We're facing this situation where all of our past jobs, such as montly-based
backups and anything older than 6 months, is getting purged from the
database. This su*cks a lot, since we need to rescan a whole tape (with
bscan) and reimport everything about it back to the database to execute a
simple restore. And to get worst: as soon as this restore job is completed
everything that was imported back to the database with the bscan gets again
automatically pruned, as below:

30-May 21:31 br01 JobId 1227: Start Restore Job
RestoreFiles.2011-05-30_21.31.56_04
30-May 21:32 br01 JobId 1227: Using Device "LTO-3"
30-May 21:32 br01 JobId 1227: Ready to read from volume "M112010" on device
"LTO-3" (/dev/nst0).
30-May 23:25 br01 JobId 1227: End of Volume at file 381 on device "LTO-3"
(/dev/nst0), Volume "M112010"
30-May 23:25 br01 JobId 1227: End of all volumes.
30-May 23:25 br01 JobId 1227: Bacula br01 5.0.3 (30Aug10): 30-May-2011
23:25:57
  Build OS:               x86_64-redhat-linux-gnu redhat 
  JobId:                  1227
  Job:                    RestoreFiles.2011-05-30_21.31.56_04
  Restore Client:         mx01
  Start time:             30-May-2011 21:31:58
  End time:               30-May-2011 23:25:57
  Files Expected:         303
  Files Restored:         303
  Bytes Restored:         116,306,589
  Rate:                   17.0 KB/s
  FD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Restore OK

-> 30-May 23:25 br01 JobId 1227: Begin pruning Jobs older than 6 months .
-> 30-May 23:26 br01 JobId 1227: Pruned 1 Job for client mx01 from catalog.
-> 30-May 23:26 br01 JobId 1227: Begin pruning Jobs.
-> 30-May 23:26 br01 JobId 1227: No Files found to prune.
-> 30-May 23:26 br01 JobId 1227: End auto prune.


So, there are two problems:

1) Backups older than 6 months are getting auto pruned from the database
2) Backups rescanned with bscan are also being auto pruned from the database
after a restore

I would like to ask your help or any tip on how to prevent these two things
from happening again. Is it a 'by-design' feature that we can't get rid of?

This is my pool configuration, which clearly states "no auto pruning" for
the Mensal ("monthly" in Portuguese) pool. (Is anything wrong with that?)

Pool {
  Name = Default
  Pool Type = Backup
  Recycle = no
  AutoPrune = no
  Volume Retention = 5 years
}
Pool {
  Name = Semanal
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Use Duration = 5 days
  Volume Retention = 28 days
  Recycle Oldest Volume = yes
  #Purge Oldest Volume = yes
  Maximum Volumes = 5
}
Pool {
  Name = Mensal
  Pool Type = Backup
  Recycle = no
  AutoPrune = no
  Volume Use Duration = 5 days
  Volume Retention = 5 years
  LabelFormat = "M${Month:p/2/0/r}${Year}"
}
Pool {
  Name = Scratch
  Pool Type = Backup
}



And this is the list of tapes which jobs are not in the database anymore:

Pool: Mensal
+---------+------------+-----------+---------+-----------------+----------+-
-------------+---------+------+-----------+-----------+---------------------
+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes        | VolFiles |
VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten
|
+---------+------------+-----------+---------+-----------------+----------+-
-------------+---------+------+-----------+-----------+---------------------
+
|      16 | M072010    | Used      |       1 | 381,731,761,152 |      385 |
157,680,000 |       1 |    0 |         0 | LTO-3     | 2010-07-06 01:53:04 |
|      19 | M082010    | Used      |       1 | 417,379,673,088 |      421 |
157,680,000 |       1 |    0 |         0 | LTO-3     | 2010-08-04 11:28:41 |
|      22 | M092010    | Used      |       1 | 431,307,426,816 |      435 |
157,680,000 |       1 |    0 |         0 | LTO-3     | 2010-09-07 02:15:09 |
|      24 | M102010    | Used      |       1 | 440,557,544,448 |      444 |
157,680,000 |       1 |    0 |         0 | LTO-3     | 2010-10-05 18:07:07 |
|      35 | M112010    | Read-Only |       1 | 450,581,448,268 |      455 |
157,680,000 |       1 |    0 |         0 | LTO-3     | 2010-11-02 02:29:38 |
|      38 | M122010    | Used      |       1 | 514,146,769,920 |      518 |
157,680,000 |       1 |    0 |         0 | LTO-3     | 2010-12-07 02:50:54 |
|      39 | M012011    | Used      |       1 | 458,172,610,560 |      462 |
157,680,000 |       0 |    0 |         0 | LTO-3     | 2011-01-04 16:58:26 |
|      40 | M022011    | Used      |       1 | 467,344,281,600 |      472 |
157,680,000 |       0 |    0 |         0 | LTO-3     | 2011-02-08 02:36:22 |
|      41 | M032011    | Used      |       1 | 472,022,756,352 |      476 |
157,680,000 |       0 |    0 |         0 | LTO-3     | 2011-03-10 01:06:03 |
|      42 | M042011    | Used      |       1 | 475,821,739,008 |      480 |
157,680,000 |       0 |    0 |         0 | LTO-3     | 2011-04-05 02:45:00 |
|      43 | M052011    | Append    |       1 | 477,475,375,104 |      481 |
157,680,000 |       0 |    0 |         0 | LTO-3     | 2011-05-03 02:42:14 |
+---------+------------+-----------+---------+-----------------+----------+-
-------------+---------+------+-----------+-----------+---------------------
+
*

Even when marked with the "Read-Only" attribute, tapes are getting pruned
again from the DB as soon as the restore job ends.


Thanks in advance.

Rodrigo Ferraz
Concept Netservices
www.conceptnetservices.com



------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
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>