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

Re: Showing changes between archives



On 01/20/15 10:32, Edward Speyer wrote:
> Is it possible for tarsnap to show exactly what changed in which files, when
> creating a new archive, preferably with --dry-run?

No.  The deduplication happens too late for this to be possible; and even if
you could figure out which files contributed to new blocks of data, the
answer wouldn't necessarily be meaningful since there are blocks with data
from multiple files.

> Or maybe it is possible for "-t -v -f <archive>" to show some sort of file
> checksum so that I can see what differences there are between two archives?

Alas, no.  The data shown by -t is in the tar headers, which are written
before the file data -- so adding a checksum there would require reading the
file twice.  And actually, even that wouldn't work, because someone could
modify the file between when the hash is computed and when the data finally
gets stored.

> I backup an external drive using tarsnap.  Unfortunately, this drive's
> filesystem (HFS+) became corrupted in a way that meant while I still had
> read-only access I couldn't get write access.  I was able to copy its contents
> onto my laptop, reformat the drive with a new HFS+ filesystem, and copy
> everything back onto the drive.  Hooray!
> 
> However, I'm a bit paranoid that during all this copying I may have had some
> bits flip and corrupted my data somehow.  I've no real reason to believe this
> is the case, but I hoped that tarsnap would actually be able to tell me.
> 
> I made a new archive with --dry-run and I'm told that a new archive would use
> 8.8MB of data from a total data size of ~120GB.  That sounds like it could be
> 8.8MB of metadata has changed during the copying, or 8.8MB of data has been
> corrupted.  Can tarsnap tell me exactly what's changed, if anything?

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?

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