Hi, I can confirm that sometime between version 1.23 and 1.25 a bug must have been introduced. Extracting an incremental backup using tar 1.23 works as I expected:
[r...@sharp test]# tar -C target/ --extract --listed-incremental=/dev/null --file=full.tar -vvv to_backup drwxr-xr-x root/root 32 2011-01-06 14:07 to_backup/ -rw-r--r-- root/root 6 2011-01-06 14:07 to_backup/deleted -rw-r--r-- root/root 6 2011-01-06 14:07 to_backup/modified -rw-r--r-- root/root 6 2011-01-06 14:06 to_backup/unmodified [r...@sharp test]# tar -C target/ --extract --listed-incremental=/dev/null --file=incr.tar -vvv to_backup drwxr-xr-x root/root 23 2011-01-06 14:09 to_backup/ tar: Deleting `to_backup/deleted' -rw-r--r-- root/root 14 2011-01-06 14:10 to_backup/modified [r...@sharp test]# [r...@sharp test]# dir target/to_backup/ total 8 -rw-r--r-- 1 root root 14 Jan 6 14:10 modified -rw-r--r-- 1 root root 6 Jan 6 14:06 unmodified Since the file 'deleted' was removed right before creating the incremental backup it was also removed when restoring incr.tar. Doing the same restore witgh tar 1.25 gives different results: [r...@sharp test]# tar -C target/ --extract --listed-incremental=/dev/null --file=full.tar -vvv to_backup drwxr-xr-x root/root 32 2011-01-06 14:07 to_backup/ -rw-r--r-- root/root 6 2011-01-06 14:07 to_backup/deleted -rw-r--r-- root/root 6 2011-01-06 14:07 to_backup/modified -rw-r--r-- root/root 6 2011-01-06 14:06 to_backup/unmodified [r...@sharp test]# [r...@sharp test]# tar -C target/ --extract --listed-incremental=/dev/null --file=incr.tar -vvv to_backup drwxr-xr-x root/root 23 2011-01-06 14:09 to_backup/ -rw-r--r-- root/root 14 2011-01-06 14:10 to_backup/modified [r...@sharp test]# [r...@sharp test]# dir target/to_backup/ total 12 -rw-r--r-- 1 root root 6 Jan 6 14:07 deleted -rw-r--r-- 1 root root 14 Jan 6 14:10 modified -rw-r--r-- 1 root root 6 Jan 6 14:06 unmodified The bug may have to do with the current directory tar was called from. When I am already withing the target-directory even tar 1.25 does the correct thing: [r...@sharp test]# cd target/ [r...@sharp target]# tar --extract --listed-incremental=/dev/null --file=../full.tar -vvv to_backup drwxr-xr-x root/root 32 2011-01-06 14:07 to_backup/ -rw-r--r-- root/root 6 2011-01-06 14:07 to_backup/deleted -rw-r--r-- root/root 6 2011-01-06 14:07 to_backup/modified -rw-r--r-- root/root 6 2011-01-06 14:06 to_backup/unmodified [r...@sharp target]# [r...@sharp target]# tar --extract --listed-incremental=/dev/null --file=../incr.tar -vvv to_backup drwxr-xr-x root/root 23 2011-01-06 14:09 to_backup/ tar: Deleting `to_backup/deleted' -rw-r--r-- root/root 14 2011-01-06 14:10 to_backup/modified [r...@sharp target]# [r...@sharp target]# dir to_backup/ total 8 -rw-r--r-- 1 root root 14 Jan 6 14:10 modified -rw-r--r-- 1 root root 6 Jan 6 14:06 unmodified Best regards
