bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] unmodified files included in incremental tar if link count was


From: bug-tar
Subject: [Bug-tar] unmodified files included in incremental tar if link count was changed
Date: Fri, 13 Jul 2018 15:53:43 +0200

Dear tar-experts

I observed lots of files that where included in incremental
tar files without beeing modified. And it seems that the
reason is a modfied hardlink count of these files.

Here's a testcase:

mkdir x
touch x/f1
touch x/f2
tar cgf x.toc x1.tar x
ln -s x/f1 x.f1
ln x/f2 x.f2
tar cgf x.toc x2.tar x
tar tvf x2.tar

Neither x/f1 nor x/f2 is changed but two links are created from
outside of the directory x onto x/f1 and x/f2.

Softlinks from outsde of directory x onto x/f1 do not influence
an incemental tar of directory x but hardlinks do.

My guess is that tar does a stat()-call on x/f2 and notices
that the st_nlink-value has increased.

Is that behaviour on purpose? It's a big problem for us
since we rsync certain directories with the link-dest-option
and this will increase the hardlink count on every file within
that directory making incremental tars of those
directories useless.

I searched through the source to change this. Any idea
which routine must be changed?

Kind regards

Peter Koch



reply via email to

[Prev in Thread] Current Thread [Next in Thread]