I have a thought, which Arno may have already had:

What if the difference between the sizes reported by 'du -sh' and Bacula is
due to block-level deduplication by Btrfs?

In other words, maybe du is reporting actual usage on disk (low, because of
deduplication), and bacula is reporting much higher actual usage during a
backup (total bytes backed up was much larger, since bacula did not
de-duplicate the data). I'm guessing this is why Arno is counting all the
bytes in relevant files. The idea would be 'Let's check du's work.'

If you ARE using block level deduplication, you could use the Bacula
aligned plugin and store any disk volumes on a similarly de-duplicated
volume. In theory, Bacula would still store the full amount of data, but
the data contained in the Bacula volumes would still be de-duplicated by
the filesystem storing the volumes.

With that said, this documentation states that btrfs implements only
offline after-the-fact deduplication. So something would have to run
periodically to de-duplicate your filesystem. Of course, some default
configuration wizard could have set up such a process for you, without your
knowledge.

https://btrfs.readthedocs.io/en/latest/Deduplication.html

Regards,
Robert Gerber
402-237-8692
[email protected]


On Wed, Mar 18, 2026 at 10:41 AM Arno Lehmann via Bacula-users <
[email protected]> wrote:

> Hi Stefan,
>
> Am 18.03.2026 um 13:13 schrieb Stefan G. Weichinger via Bacula-users:
> > Am 18.03.26 um 10:53 schrieb Arno Lehmann via Bacula-users:
> >
> ...
> >> C=0 S=0 find . -type f -printf '%s\n' | while read f ; do (( S = S +
> >> $f )) ; (( C++ )); if ! (( C % 50 )) ; then echo $C: $S ; fi  ; done
> >
> > whatever that does ;-) will try a bit later
>
> Sorry... of course I thought it was obvious ;-)
>
> I just counts bytes of files. You probably want to adapt the find
> options to your environment.
>
> >>> That directory is located in a btrfs-pool, might that play a role here?
> >>
> >> Definitely. I've never really used btrfs, but the commands
> >>
> >> btrfs filesystem du
> >>
> >> and
> >>
> >> btrfs filesystem df
> >>
> >> probably exist for a rason :-)
> >
> > That's on filesystem-level, shouldn't play a role for the directory.
> > And there are no snapshots for the directory, but only for the whole "/
> > home".
> >
> > I will dig deeper asap
>
>
> And I'm still curious, recalling some experience with ZFS (years ago).
>
> Cheers,
>
> Arno
>
> --
> Arno Lehmann
>
> IT-Service Lehmann
> Sandstr. 6, 49080 Osnabrück
>
>
>
> _______________________________________________
> Bacula-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to