[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] (forw) tar --listed-incremental bogous?
From: |
Sergey Poznyakoff |
Subject: |
Re: [Bug-tar] (forw) tar --listed-incremental bogous? |
Date: |
Mon, 16 Feb 2004 22:44:32 +0200 |
Hi Andreas,
> then tar is broken in some othe way. as my modified demo script
> shows, it does not honor the snapshot file and does a full backup
> again, including all files in the backup. it should have scipped
> file1 in the second backup.
Incremental backups the way they are implemented now, have
given raise to quite a number of bug reports and notices. This is
partly because of the intrinsic inconsistencies in the implementation
itself (see below), partly because of the lack of documentation.
Notice, that listed-incremental, in its present state, assumes that
the names given to tar are actually *directory* names (that's because
it is based on comparing the directory mtime). So, currently,
instead of `tar --listed=name ... $DIR/file*' one should use
`tar --listed=name ... $DIR'.
Another point is that the first line of the snapshot file contains the
timestamp of the last run of tar. Thus the lines 17-21 of your test script:
mkdir $DIR
touch $F1
echo "$DIR/*1" > $INCF
tar --verbose \
will, in the majority of runs, cause the timestamp saved in
$SNAPSHOT_FILE to equal the mtime of the file $F1, and therefore
this file will be considered new when invoking tar second time.
That is the reason while file1 gets included twice. Simply adding `sleep 1',
after `touch' (along with the above modification) will make tar behave
as it should.
Now I am doing a major rewrite of tar, which among other issues will
address incremental backups. In the meantime, however, I hope that the
above description will help you in using current snapshots of tar.
Regards,
Sergey