dar diff that detects missing and added files

John Goerzen via Dar-support <[email protected]> Fri, 28 Nov 2025 08:52:28 -0600
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
Hi,

I'm looking into how to verify that a filesystem matches the original
source material, especially when the target is the result of applying
differential atop differential maybe every day for years.

Previously I had been using mtree to do this, but it occurred to me that
the dar catalog for each differential actually captures the full state
of the filesystem.

I noticed that dar --diff will notice if a file present in the catalog
is missing from the filesystem, but will not notice if there is a file
in the filesystem that was missing from the archive.

The notes hinted at doing a differential in dry-run mode, but even when
run with -v, it gives the opposite: files that were added to the
filesystem but not ones that were omitted.

It would be great if --diff could notice both.

I've found a workaround in:

dar -v -c - --on-fly-isolate diff --ref t2 -R directory > /dev/null

Then I can do:

dar -as -l diff

which is approximately what I'm after.  This has the inefficiency that
it will try to read every modified file, which is strictly unnecessary
for this operation, but does seem to work.

Is there a better way to do this?  Could diff be enhanced to do it?

Thanks!

John