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

Re: Showing changes between archives



On 01/21/15 06:56, Edward Speyer wrote:
> On 20 January 2015 at 22:15, Colin Percival <cperciva@tarsnap.com
> <mailto:cperciva@tarsnap.com>> wrote:
>     If you run -tv, do you see different timestamps on the files?  Your process of
>     copying data around sounds like it would have changed the file modification
>     times, which would result in entirely new tar archive headers.  8.8 MB is
>     around 17000 tar headers; is that how many files you have?
> 
> Thanks for the analysis Colin.  I had a backup of this archive from Jan 16
> before I had the filesystem corruption and I just created a new archive
> (today, Jan 21.)  I've done a diff of the "-t -v" output between the two archives.
> 
> From looking at the first character of the output, there are ~278330 files,
> 63887 directories, 2637 symbolic links, 22 links, and 4 named pipes in each
> archive.  The latter contains a few extra emails (~80kb) over the former,
> hence the "~278330".

Huh, I'd expect more "new data" in that case.  Or is the 8.8 MB after
compression?  Tar headers compress very well...

> I had to write a script to process the output in order to be able to do a
> diff.  In the archive from Jan 16, according to the "-t -v" output, most files
> have a link count of 1, but those same files in the Jan 21 archive have a link
> count of 0.  Everything else -- mode, owner, group, size and mtime -- is
> identical in the two listings.  The files on the drive itself are readable and
> have a link count of 1 when I do an "ls -l" in OS X, with the drive mounted,
> and I can also restore files from the Jan 21 tarsnap archive without error.

Interesting.  The 'link count' isn't included in the default tar header, but
is included if tarsnap decides that it needs to add a pax header.  Something
else must have changed to make tarsnap change its mind about that; if you're
curious, run `tarsnap -r -f archivename | hexdump -C | head -64` and compare
the headers.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid