Re: dar -d -- diff of file data or metadata?

Denis Corbin <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
On 30/03/2021 01:39, David Niklas wrote:
> Hi,

Hi,

> I've been relying on dar since I first started doing backups (years ago).
> And I've rarely touched anything else. Eventually, I found myself having
> to perform a final differential backup of my data because my filesystem
> was badly corrupted by an accident.
> When I did this, I noted that some files, which I knew to have been
> affected, dar reported as identical to the originals in my full backup.
> 
> I'm concerned that when I run "dar -d" on my backups to ensure that the
> metadata and file-data is identical to the data on disk I will be only
> comparing the metadata, not the file-data.

-d option compares both data and metadata (if only metadata was compared
it would be much much faster to complete!)

> 
> The rational for running "dar -d" vs. "dar -x; diff original/ backup/" is:
> Not everyone has enough space remaining on their disks to decompress the
> archives that they create.

dar -t operation extract the data to a libdar internal pseudo /dev/null,
doing that it computes the CRC and compares it with the one stored in
the archive beside the file's metadata which are also compared according
to -O option passed.

dar -d does the same as -t option, except that it also compares the data
of saved files byte by byte to their filesystem counterpart, instead of
throwing away each extracted file's data.

> 
> I have upgraded my disk capacity and count over the years and have used
> dar each time. I assumed, perhaps foolishly, that dar diff'ed the
> metadata AND filedata.

You assumed correctly, not foolishly.

> 
> Please tell me which way it is. And perhaps clarify it inside of the man
> page.

Note that in the context of differential and incremental backups, dar
will check file's metadata only to decide whether a file has changed
since the backup of reference was made. If data corruption occurred
inside the data only (leaving untouched the metadata), the corrupted
version of the file will not be saved by dar (unless file has been
created after the backup of reference).

In that context, comparing a differential backup with a filesystem (-d
option), let dar check what is in the backup, if the file had not
changed, only its metadata is present and thus possible to compare to
the live (possibly corrupted) filesystem. Thus, a data corruption
affecting a file's data (not its metadata) is impossible to detect and
report, and the funny thing is that your backup are more sane than your
filesystem, while not wasting your backup storage with corrupted data.

I hope this can bring some light to the behavior you have observed,
while nothing tells this is what succeeded, this is just a very probable
hypothesis.

> 
> Thanks,
> David
>

Regards,
Denis

_______________________________________________
Dar-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dar-support
OpenPGP_signature (application/pgp-signature, 840 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.