Hi,
Thanks for the answer.

i have a pool for a client.
And i have a script python for purge+delete volume before the Full backup. ( for optimize the disk space on retention , script -> Full , Incr, Incr ../.. , script -> Full , incr, incr ...)

This script utilize the modify query 3 + 4 ( see below ) and with the result i purge and delete the volume on FS.

And if the empty volume are not in list , there are not purge + deleted . normal ;)

I'm watching all this. this has worked for many years.
some other things seem strange since the update in 9.2.2. I lead my research and keep you informed.

-----------------------------
"cur.execute("""SELECT DISTINCT StartTime
 FROM Client,Job,JobMedia,Media
 WHERE Client.Name='{hostname}-fd'
 AND Client.ClientId=Job.ClientId
 AND Level='F' AND JobStatus IN ('T', 'W')
 AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId
 ORDER BY Job.StartTime DESC LIMIT 1;""".format(hostname=hostname))
../.. And
cur.execute("""SELECT DISTINCT Job.JobId,Client.Name as Client,Level,StartTime,JobFiles,JobBytes,VolumeName
 FROM Client,Job,JobMedia,Media
 WHERE Client.Name='{hostname}-fd'
 AND Client.ClientId=Job.ClientId
 AND JobStatus IN ('T', 'W')
 AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId
 AND Job.StartTime < '{DateSelect}'
 ORDER BY Job.StartTime;""".format(hostname=hostname, DateSelect=DateSelect))
"

Le 11/01/2019 à 11:58, Radosław Korzeniewski a écrit :
Hello,

czw., 10 sty 2019 o 14:40 Olivier Delestre <olivier.deles...@univ-rouen.fr <mailto:olivier.deles...@univ-rouen.fr>> napisał(a):

    hi,

    i use bacula v9.2.2 and storage on disk.
    i notice that when an incremantal is empty, bacula make a tape
    with a file ( 612 bytes ).
    when you list with the query "5: List all backups for a Client" ,
    this volume is not present.


This is absolutely fine. Bacula will create a volume for your job as it has to have a place to save your backup. Then it start to search for data to save - the "empty" volume is already created. When Bacula cannot find any data to save - the "incremental is empty" then the volume remains empty for this job. As the volume does not contain any data from this particular job - do you remember your "incremental is empty" then it cannot be listed as a resource for this job.

In Bacula the single volume can have a multiple jobs saved and the single job can span a multiple volumes.

    but present in the pool and the file system.
    see below on the vol conty-2546


Well, you configured your job and especially your pool to close volume as soon as it is created by a single job, so the operations you observe are performed on your request. If this is not what you expect then you should change your configuration accordingly.

    note : the query is issue from sample-query.sql

    How to have this volume in my list ?


Why?

    A Bug or not ??


Why do you think it is a bug?


    Thanks
    ----
    Choose a query (1-21): 5
    Enter Client Name: conty-fd
    
+--------+----------+---------------+-------+---------------------+----------+----------------+------------+
    | jobid  | client   | fileset       | level | starttime          
    | jobfiles | jobbytes       | volumename |
    
+--------+----------+---------------+-------+---------------------+----------+----------------+------------+
    | 15,276 | conty-fd | fileset_conty | F     | 2018-12-01 22:00:02
    |    8,121 | 11,532,984,139 | conty-2471 |
    | 15,323 | conty-fd | fileset_conty | I     | 2018-12-03 22:00:02
    |        1 |        221,917 | conty-2481 |
    | 15,540 | conty-fd | fileset_conty | I     | 2018-12-10 22:00:02
    |        1 |        222,648 | conty-2487 |
    | 15,683 | conty-fd | fileset_conty | I     | 2018-12-14 22:00:03
    |        1 |              0 | conty-2503 |
    | 15,755 | conty-fd | fileset_conty | I     | 2018-12-17 22:00:02
    |        1 |        223,377 | conty-2510 |
    | 15,977 | conty-fd | fileset_conty | I     | 2018-12-24 22:00:02
    |        1 |        224,106 | conty-2514 |
    | 16,198 | conty-fd | fileset_conty | I     | 2018-12-31 22:00:01
    |        1 |        224,835 | conty-2529 |
    | 16,374 | conty-fd | fileset_conty | F     | 2019-01-05 22:02:31
    |    8,120 | 11,532,987,786 | conty-2401 |
    | 16,421 | conty-fd | fileset_conty | I     | 2019-01-07 22:00:02
    |        1 |        225,566 | conty-2407 |
    | 16,495 | conty-fd | fileset_conty | I     | 2019-01-09 22:00:02
    |      226 | 10,177,801,880 | conty-2412 |
    
+--------+----------+---------------+-------+---------------------+----------+----------------+------------+
    *list media pool=conty
    
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------+----------+---------------------+-----------+
    | mediaid | volumename | volstatus | enabled | volbytes       |
    volfiles | volretention | recycle | slot | inchanger | mediatype |
    voltype | volparts | lastwritten         | expiresin |
    
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------+----------+---------------------+-----------+
    |   2,401 | conty-2401 | Used      |       1 | 11,542,823,537
    |        2 |    5,529,600 |       1 |    0 |         0 | File     
    |       1 |        0 | 2019-01-05 22:05:03 | 5,124,733 |
    |   2,404 | conty-2404 | Used      |       1 | 612 |        0 |   
    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2019-01-06 22:00:02 | 5,210,832 |
    |   2,407 | conty-2407 | Used      |       1 | 226,476 |        0
    |    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2019-01-07 22:00:02 | 5,297,232 |
    |   2,410 | conty-2410 | Used      |       1 | 612 |        0 |   
    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2019-01-08 22:00:02 | 5,383,632 |
    |   2,412 | conty-2412 | Used      |       1 | 10,185,386,134
    |        2 |    5,529,600 |       1 |    0 |         0 | File     
    |       1 |        0 | 2019-01-09 22:00:34 | 5,470,064 |
    |   2,415 | conty-2415 | Recycle   |       1 |              1
    |        0 |    5,529,600 |       1 | 0 |         0 | File     
    |       1 |        0 | 2018-11-12 22:00:40 |   458,870 |
    |   2,418 | conty-2418 | Purged    |       1 | 56,360,634 |       
    0 |    5,529,600 |       1 |    0 |         0 | File      |      
    1 |        0 | 2018-11-13 22:00:07 |   545,237 |
    |   2,422 | conty-2422 | Purged    |       1 | 9,601,588,270
    |        2 |    5,529,600 |       1 |    0 |         0 | File     
    |       1 |        0 | 2018-11-14 22:00:41 |   631,671 |
    |   2,426 | conty-2426 | Purged    |       1 | 51,766,177 |       
    0 |    5,529,600 |       1 |    0 |         0 | File      |      
    1 |        0 | 2018-11-15 22:00:03 |   718,033 |
    |   2,429 | conty-2429 | Purged    |       1 | 51,991,866 |       
    0 |    5,529,600 |       1 |    0 |         0 | File      |      
    1 |        0 | 2018-11-16 22:00:03 |   804,433 |
    |   2,432 | conty-2432 | Purged    |       1 | 14,694,037 |       
    0 |    5,529,600 |       1 |    0 |         0 | File      |      
    1 |        0 | 2018-11-17 22:00:03 |   890,833 |
    |   2,434 | conty-2434 | Purged    |       1 | 14,694,037 |       
    0 |    5,529,600 |       1 |    0 |         0 | File      |      
    1 |        0 | 2018-11-18 22:00:03 |   977,233 |
    |   2,437 | conty-2437 | Purged    |       1 | 9,603,018,725
    |        2 |    5,529,600 |       1 |    0 |         0 | File     
    |       1 |        0 | 2018-11-19 22:00:32 | 1,063,662 |
    |   2,440 | conty-2440 | Purged    |       1 | 52,991,437 |       
    0 |    5,529,600 |       1 |    0 |         0 | File      |      
    1 |        0 | 2018-11-20 22:00:03 | 1,150,033 |
    |   2,443 | conty-2443 | Purged    |       1 | 70,055,727 |       
    0 |    5,529,600 |       1 |    0 |         0 | File      |      
    1 |        0 | 2018-11-21 22:00:03 | 1,236,433 |
    |   2,446 | conty-2446 | Purged    |       1 | 54,381,421 |       
    0 |    5,529,600 |       1 |    0 |         0 | File      |      
    1 |        0 | 2018-11-22 22:00:03 | 1,322,833 |
    |   2,449 | conty-2449 | Purged    |       1 | 10,092,046,842
    |        2 |    5,529,600 |       1 |    0 |         0 | File     
    |       1 |        0 | 2018-11-23 22:00:36 | 1,409,266 |
    |   2,452 | conty-2452 | Purged    |       1 | 588 |        0 |   
    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2018-11-25 22:00:02 | 1,582,032 |
    |   2,456 | conty-2456 | Purged    |       1 | 222,074 |        0
    |    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2018-11-26 22:00:03 | 1,668,433 |
    |   2,471 | conty-2471 | Used      |       1 | 11,542,820,066
    |        2 |    5,529,600 |       1 |    0 |         0 | File     
    |       1 |        0 | 2018-12-01 22:01:19 | 2,100,509 |
    |   2,481 | conty-2481 | Used      |       1 | 222,827 |        0
    |    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2018-12-03 22:00:02 | 2,273,232 |
    |   2,487 | conty-2487 | Used      |       1 | 223,558 |        0
    |    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2018-12-10 22:00:02 | 2,878,032 |
    |   2,503 | conty-2503 | Used      |       1 | 734 |        0 |   
    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2018-12-14 22:00:03 | 3,223,633 |
    |   2,510 | conty-2510 | Used      |       1 | 224,287 |        0
    |    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2018-12-17 22:00:03 | 3,482,833 |
    |   2,514 | conty-2514 | Used      |       1 | 225,016 |        0
    |    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2018-12-24 22:00:03 | 4,087,633 |
    |   2,529 | conty-2529 | Used      |       1 | 225,745 |        0
    |    5,529,600 |       1 |    0 |         0 | File      |       1
    |        0 | 2018-12-31 22:00:02 | 4,692,432 |
    |   2,546 | conty-2546 | Used      |       1 |            612
    |        0 | 5,529,600 |       1 |    0 |         0 | File      |
    1 |        0 | 2019-01-04 22:00:03 | 5,038,033 |
    
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------+----------+---------------------+-----------+

    ---
    on file system :
    --
    ll -tr
    total 2935128
    -rw-r-----. 1 bacula disk 11542820066 Dec  1 22:01 conty-2471
    -rw-r-----. 1 bacula disk      222827 Dec  3 22:00 conty-2481
    -rw-r-----. 1 bacula disk      223558 Dec 10 22:00 conty-2487
    -rw-r-----. 1 bacula disk         734 Dec 14 22:00 conty-2503
    -rw-r-----. 1 bacula disk      224287 Dec 17 22:00 conty-2510
    -rw-r-----. 1 bacula disk      225016 Dec 24 22:00 conty-2514
    -rw-r-----. 1 bacula disk      225745 Dec 31 22:00 conty-2529
    -rw-r-----. 1 bacula disk         612 Jan  4 22:00 conty-2546
    -rw-r-----. 1 bacula disk 11542823537 Jan  5 22:05 conty-2401
    -rw-r-----. 1 bacula disk         612 Jan  6 22:00 conty-2404
    -rw-r-----. 1 bacula disk      226476 Jan  7 22:00 conty-2407
    -rw-r-----. 1 bacula disk         612 Jan  8 22:00 conty-2410
    -rw-r-----. 1 bacula disk 10185386134 Jan  9 22:00 conty-2412

    --


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



--
Radosław Korzeniewski
rados...@korzeniewski.net <mailto:rados...@korzeniewski.net>

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

Reply via email to