bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Error when extract incremental backup file with -C or --strip-


From: Jae Sang Lee
Subject: [Bug-tar] Error when extract incremental backup file with -C or --strip-components options.
Date: Tue, 8 May 2012 14:44:05 +0900

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.

address@hidden:~/archive/restore$ tar xvf archive.1.tar --listed-incremental=/dev/null
test/
test/a
test/b
address@hidden:~/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
address@hidden:~/archive/restore$ mkdir restore
address@hidden:~/archive/restore$ tar xvf archive.1.tar --listed-incremental=/dev/null -C restore/
test/
test/a
test/b
address@hidden:~/archive/restore$ tar xvf archive.2.tar --listed-incremental=/dev/null -C restore/
test/
address@hidden:~/archive/restore$ ls restore/test/
b

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

Regards,
Jay

reply via email to

[Prev in Thread] Current Thread [Next in Thread]