2 This bug fixes the LastWritten field which was updated during
3 a restore (or a reading migration)
6 This patch applies to Bacula version 2.2.5 (and previous versions),
7 and can be applied with the following:
10 patch -p0 <2.2.5-lastwritten.patch
11 ./configure (your options)
18 Index: src/dird/catreq.c
19 ===================================================================
20 --- src/dird/catreq.c (révision 5789)
21 +++ src/dird/catreq.c (copie de travail)
25 Dmsg2(400, "Update media: BefVolJobs=%u After=%u\n", mr.VolJobs, sdmr.VolJobs);
26 + /* Check if the volume has been written by the job,
27 + * and update the LastWritten field if needed */
28 + if (mr.VolBlocks != sdmr.VolBlocks) {
29 + mr.LastWritten = sdmr.LastWritten;
31 /* Copy updated values to original media record */
32 mr.VolJobs = sdmr.VolJobs;
33 mr.VolFiles = sdmr.VolFiles;
35 mr.VolMounts = sdmr.VolMounts;
36 mr.VolErrors = sdmr.VolErrors;
37 mr.VolWrites = sdmr.VolWrites;
38 - mr.LastWritten = sdmr.LastWritten;
40 mr.InChanger = sdmr.InChanger;
41 mr.VolReadTime = sdmr.VolReadTime;