Hi, all
I tried to backup/restore using tar incremental options. But there are some
errors when extract archive files.

In detail, there are two archive file.
archive.1.tar and archive.2.tar

archive.1.tar is

test/
test/a
test/b

archive.2.tar is

test/
test/a
test/b <deleted>

Now, I expect file 'b' is deleted when I extract all .tar files.
If there are no option except --listed-incremental, result is OK.

nova@compute2:~/archive/restore$ tar xvf archive.1.tar
--listed-incremental=/dev/null
test/
test/a
test/b
nova@compute2:~/archive/restore$ tar xvf archive.2.tar
--listed-incremental=/dev/null
test/
*tar: Deleting `test/b'*

But, When I plus -C or --strip-components options, deleting isn't happen.

-C
nova@compute2:~/archive/restore$ mkdir restore
nova@compute2:~/archive/restore$ tar xvf archive.1.tar
--listed-incremental=/dev/null -C restore/
test/
test/a
test/b
nova@compute2:~/archive/restore$ tar xvf archive.2.tar
--listed-incremental=/dev/null -C restore/
test/
nova@compute2:~/archive/restore$ ls restore/test/
a  *b*

--strip-components
nova@compute2:~/archive/restore$ tar xvf archive.1.tar
--listed-incremental=/dev/null --strip-components 1
test/a
test/b
nova@compute2:~/archive/restore$ tar xvf archive.2.tar
--listed-incremental=/dev/null --strip-components 1
nova@compute2:~/archive/restore$ ls
a  archive.1.tar  archive.2.tar  *b*

Regards,
Jay

Reply via email to