[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Archiving While Modifying
Hi Mark (& list),
Mark McGranaghan wrote:
> Does tarsnap have any particular semantics/guarantees for creating
> archives of files that may be changing while tarsnap(1) is creating an
> archive? What about if the files being archived are only being
> appended to? How would tarnsap handle a file that is rename(2)'d to
> the name of a file that was in the process of being archived?
Tarsnap iterates through the files and directories listed on the command
line, recursing into directories, in order to find objects to archive.
When it finds a file, Tarsnap will open it and archive its contents, up
to the length of the file when Tarsnap opened it.
Hence,
1. If you replace a file with another while it is being archived, you'll
either get the old file or the new file archived, but not a combination
of the two.
2. If you append more data to a file while it is being archived, you'll
have archived a copy of what the file looked like at some point while
Tarsnap was running, which is likely to be neither the file as it was
when Tarsnap started nor the file as it was when Tarsnap exited.
3. If you make changes throughout a file, you could end up with an archived
copy containing modifications late in the file but not modifications early
in the file, even if the modifications early in the file occurred first.
--
Colin Percival
Security Officer, FreeBSD | freebsd.org | The power to serve
Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid