[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnu tar w/ --listed-incremental --files-from
From: |
Miek Gieben |
Subject: |
Re: gnu tar w/ --listed-incremental --files-from |
Date: |
Wed, 29 Jan 2003 13:33:54 +0100 |
User-agent: |
Vim/Mutt/Linux |
[On 28 Jan, @12:20, Stepan wrote in "Re: gnu tar w/ --listed-increm ..."]
>
> tar cf file.tar --listed-incremental=/save/to/a/file \
> /this/path /that/path ...
>
> when you run it for the first time, it creates the file ``/save/to/a/file''
> which, in general, is in a special format and should not be read nor
> modified by mere mortals.
>
> When you run _exactly the same command_ a day or two later, a files which
> has been modified (another date, another size, ...) or which newly appeared
> are included in todays backup.
>
> So I'd say that the list of ``given files'' should be the same, in fact the
> whole command line and contents of --files-from should be exactly the same.
> Then tar adapts to the changes which happened from the last run.
> If the command line has changed, let's suppose that the tar behaviour is
> undefined. (At least in this level of the game.)
>
> Even if we stay within the outlined boundaries, we may encounter a few bugs:
>
> 1) If the list of ``given files'' contains a regular file, this file is
> backed up each time the command is run.
>
> Workaround: if you need incremental backup of individual files, either
> check the timestamp manualy, or use stub directories.
>
> In any case, accept the following rule: the list of ``given files'' for
> an incremental backup should contain only directory names.
>
> 2) If the list of given files contains mountpoints and option
> --one-filesystem is given, some the mountpoints may not be included.
> Example: tar ... --one-filesystem / /var
> tar remembers to skip /var as it doesn't belong to the root filesystem
> and the fact that it's explicitly mentioned later doesn't help.
>
> Fix: use the patch I've mentioned before.
>
> Conclusion:
> start with patterns which are known to work and carefully extend your
> territorium. When you find a place where lions live, either conquer over
> them, or be careful not to enter that spot again...
well, what I gather from your words here, is that incremental backups with tar
are sort of broken? If so, I think that leaves us with 2 options:
1) rip out the incremental stuff from tar. Tell people to use 'find' and let
tar only create the archive
2) fix the incremental code. This would mean ripping out --incremental and
totally rewritting --listed-incremental
Either way a lot of work I guess...
On a side note:
tar --listed-incremental <file-with-only-a-date> --files-from <empty file>
will tar the current directory instead of complaining with: Cowardly refusing
to create an empty archive. This is due to the addname (".") in incremen.c
grtz Miek