[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: some questions regarding tarsnap: from a new user
On Tue, May 31, 2016 at 11:24:36AM -0700, Sarah Alawami wrote:
> 2. I did a dry run on a script to make sure it would work. The archive size was very wrong. The size of the folder including all of the sub folders is 14 gig. This was shown by a du -sh on the folder in question. I'm only showing 800 mb. Is this maybe because I don't have enough funds deposited into the account?
Testing something with --dry-run doesn't involve funds in your account, or the
tarsnap servers at all. I just verified this by unplugging the network cable
from my computer and running:
$ tarsnap --dry-run --print-stats --humanize-numbers -c ~/src/tarsnap
tarsnap: Removing leading '/' from member names
Total size Compressed size
All archives 25 MB 10 MB
(unique data) 24 MB 10 MB
This archive 25 MB 10 MB
New data 24 MB 10 MB
Note, however, that du reports a different size:
$ du --si -sh ~/src/tarsnap/
37M /home/td/src/tarsnap/
This is because of the filesystem block size [1]. We can check that with:
$ tar -cf src-tarsnap.tar ~/src/tarsnap
tar: Removing leading `/' from member names
$ ls --si -lh src-tarsnap.tar
-rw-rw-r-- 1 td td 24M May 31 14:49 src-tarsnap.tar
That said, going from 14 gigs to 0.8 sounds rather extreme, unless you have a
huge number of small files and directories. I wonder, though, if the 800mb is
the "compressed size" or the "unique data"?
Could you check the actual tarsnap --print-stats output? That would help us
give better guesses as to what's happening. Also, trying
tar -cf temp-name.tar DIRECTORY
ls --si -lh temp-name.tar
would give us a better idea of how much the filesystem block size is
contributing.
[1] for some more info about filesystem blocks here:
http://stackoverflow.com/questions/497024/why-would-a-tar-file-be-smaller-than-it-s-contents
Cheers,
- Graham Percival