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

Re: about network failures while uploading



On 07/08/11 09:43, Daniel Staal wrote:
> On Fri, July 8, 2011 10:51 am, Harry Putnam wrote:
>> But wait, when you deleted the partial... how does that data then
>> end up in the new archive?
> 
> (Don't take this as authoritative technical info; it is what I understand
> from the docs.)  Tarsnap uploads the data in encrypted blocks.  As long as
> at least one backup in your set refers to an encrypted block, it will be
> retained.

Yes.

> So you've uploaded a set of encrypted blocks, but not the whole set for
> the backup you were trying to make.  If you try to make a new backup of
> the same files, it will see that those blocks are already there, and
> upload the rest of the blocks, while creating references to the ones
> already there.  Then you can delete the reference from the partial backup,
> but all the blocks will be referenced from the new backup, and therefore
> preserved.

Yes, aside from one small point -- tarsnap doesn't look on the server to see
which blocks are there, as that would (a) be slow, and (b) disclose to the
server information about what data is in the archive.  Instead, tarsnap looks
in its cache directory (which is why it's necessary that the cache directory
stays in sync with the server).

The key point to remember is that blocks are deleted once no remaining archives
use them -- so you want to create a new archive *before* you delete the old one.
Tarsnap can't read your mind and say "oh, he's going to want these blocks soon,
I'll hold on to them for now".

-- 
Colin Percival
Security Officer, FreeBSD | freebsd.org | The power to serve
Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid