Mandi! Josh Fisher via Bacula-users
  In chel di` si favelave...

> I use the following in my query.sql file:

OK, thanks! Now i can verify that:

*list media pool=FVG-PP-HFA3-1FilePool 
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------+----------+---------------------+------------+
| mediaid | volumename | volstatus | enabled | volbytes    | volfiles | 
volretention | recycle | slot | inchanger | mediatype | voltype | volparts | 
lastwritten         | expiresin  |
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------+----------+---------------------+------------+
|     311 | HFA3-1001  | Used      |       1 | 671,649,105 |        0 |   
31,536,000 |       1 |    0 |         0 | File      |       1 |        0 | 
2024-03-11 13:32:47 | 25,917,437 |
|     312 | HFA3-1002  | Used      |       1 | 572,824,127 |        0 |   
31,536,000 |       1 |    0 |         0 | File      |       1 |        0 | 
2024-04-19 12:02:12 | 29,278,002 |
|     313 | HFA3-1003  | Used      |       1 | 549,268,745 |        0 |   
31,536,000 |       1 |    0 |         0 | File      |       1 |        0 | 
2024-04-05 12:31:41 | 28,070,171 |
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------+----------+---------------------+------------+

So all three volumes are 'Used', but:

*query
Available queries:
     1: The default file is empty, see sample-query.sql (in /opt/bacula/scripts 
or <bacula-source>/examples) for samples
     2: List Volumes Bacula thinks are in changer
     3: List Jobs stored for a given Volume name
Choose a query (1-3): 3
HFA3-1001
+--------+---------------+---------------------+------+-------+-------+-------------+--------+
| jobid  | name          | starttime           | type | level | files | bytes   
    | status |
+--------+---------------+---------------------+------+-------+-------+-------------+--------+
| 17,871 | FVG-PP-HFA3-1 | 2024-03-04 08:30:03 | B    | I     |    26 |  
91,105,874 | T      |
| 17,951 | FVG-PP-HFA3-1 | 2024-03-06 11:00:37 | B    | I     |    26 |  
91,143,228 | T      |
| 18,031 | FVG-PP-HFA3-1 | 2024-03-08 09:30:18 | B    | I     |    26 |  
91,219,430 | T      |
| 18,146 | FVG-PP-HFA3-1 | 2024-03-11 13:31:19 | B    | I     |   180 | 
103,719,272 | T      |
+--------+---------------+---------------------+------+-------+-------+-------------+--------+
*query
Available queries:
     1: The default file is empty, see sample-query.sql (in /opt/bacula/scripts 
or <bacula-source>/examples) for samples
     2: List Volumes Bacula thinks are in changer
     3: List Jobs stored for a given Volume name
3
HFA3-1002
+--------+---------------+---------------------+------+-------+-------+-------------+--------+
| jobid  | name          | starttime           | type | level | files | bytes   
    | status |
+--------+---------------+---------------------+------+-------+-------+-------------+--------+
| 19,251 | FVG-PP-HFA3-1 | 2024-03-01 12:00:46 | B    | F     |   220 | 
202,599,865 | T      |
| 19,380 | FVG-PP-HFA3-1 | 2024-04-10 10:30:29 | B    | I     |    32 |  
92,476,120 | T      |
| 19,674 | FVG-PP-HFA3-1 | 2024-04-17 12:32:09 | B    | I     |    43 |  
94,865,312 | T      |
| 19,717 | FVG-PP-HFA3-1 | 2024-04-18 14:31:21 | B    | I     |    26 |  
91,221,368 | T      |
| 19,761 | FVG-PP-HFA3-1 | 2024-04-19 12:00:46 | B    | I     |    26 |  
91,201,318 | T      |
+--------+---------------+---------------------+------+-------+-------+-------------+--------+
*query
Available queries:
     1: The default file is empty, see sample-query.sql (in /opt/bacula/scripts 
or <bacula-source>/examples) for samples
     2: List Volumes Bacula thinks are in changer
     3: List Jobs stored for a given Volume name
Choose a query (1-3): 3
Enter Volume name: HFA3-1003
+--------+---------------+---------------------+------+-------+-------+------------+--------+
| jobid  | name          | starttime           | type | level | files | bytes   
   | status |
+--------+---------------+---------------------+------+-------+-------+------------+--------+
| 18,271 | FVG-PP-HFA3-1 | 2024-03-14 09:30:13 | B    | I     |    56 | 
95,033,470 | T      |
| 18,312 | FVG-PP-HFA3-1 | 2024-03-15 12:30:56 | B    | I     |    26 | 
91,460,402 | T      |
| 19,053 | FVG-PP-HFA3-1 | 2024-04-02 17:58:02 | B    | I     |   106 | 
94,924,477 | T      |
| 19,086 | FVG-PP-HFA3-1 | 2024-04-03 09:00:07 | B    | I     |    26 | 
91,090,544 | T      |
| 19,129 | FVG-PP-HFA3-1 | 2024-04-04 12:30:51 | B    | I     |    23 | 
85,044,862 | T      |
| 19,172 | FVG-PP-HFA3-1 | 2024-04-05 12:30:55 | B    | I     |    26 | 
91,252,044 | T      |
+--------+---------------+---------------------+------+-------+-------+------------+--------+

Only volume 3 have 6 jobs within, while volume 1 and 2 have 4 and 5
respectively, so they are nod really 'Used'.


So seems to me that 'time based retention' work as expected, eg jobs and
file get purged and volume recycled, but if i try 'job based retention'
volumes get not purged correctly.
I suspect that 'job counter' get resetted if and only if all jobs in a
volume get purged; this lead me to think that my configuration simpy does
not work in a real situation, because sooner or later jobs get 'scattered'
between volumes and virtual job of consolidation stop to work, so jobs and
volume purging.


I see two solution:

1) put anyway a decent quantity of volumes and a 'time based retention'; in
 this way sooner or later jobs get purged and volumes too; eg, 12 volumes
with 6 jobs within and a file and job retention of 3 months.
Cons: if backup does not start for a time more then the retention, i risk
 to purge also the full job, loosing the backup (the metadata of, indeed).

2) define another pool for the full, with a single volume within with no
 retention. Use the normal pool for incremental, with a decent retention; in
this way i can lost all the incremental, but the full remein safe.


Could be? Thanks.

-- 
dott. Marco Gaiarin                                     GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''          http://www.lanostrafamiglia.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

                Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
      http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000
        (cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)




_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to