bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] leading / included in incremental snapshot rename code


From: Nicholas Cole
Subject: [Bug-tar] leading / included in incremental snapshot rename code
Date: Fri, 28 Sep 2007 19:02:49 -0400
User-agent: Mutt/1.4.2.2i

A leading / is being included in incremental snapshot rename codes
when a member name has a leading / and tar removes leading / from
member names when the archive is created

Is this a bug or am I doing something incorrect?

Tested on debian etch with gnu tar versions 1.16 (debian etch) and
1.18 (source)

When I extract the full then the incremental archive in the example
below, tar deletes both /backup/two and /restore/backup/two

If I specify backup as the archive member instead of /backup the
last extract works as expected by only deleteing backup/two

debian:/# mkdir -p backup/one backup/two
debian:/# mkdir restore
debian:/# tar -v -c -f backup.tar --listed-incremental=backup.snapshot /backup
tar: /backup/one: Directory is new
tar: /backup/two: Directory is new
tar: Removing leading `/' from member names
/backup/
/backup/one/
/backup/two/
debian:/# mv /backup/two /backup/three
debian:/# tar -v -c -f backup-2.tar --listed-incremental=backup.snapshot /backup
tar: /backup/three: Directory has been renamed from `/backup/two'
tar: Removing leading `/' from member names
/backup/
/backup/one/
/backup/three/
debian:/# cd restore
debian:/restore# tar -v -x -f ../backup.tar --listed-incremental /dev/null
backup/
backup/one/
backup/two/
debian:/restore# tar -v -x -f ../backup-2.tar --listed-incremental /dev/null
backup/
tar: Cannot rename `/backup/two' to `/backup/three': No such file or directory
backup/one/
backup/three/
tar: Error exit delayed from previous errors


debian:/# tar -v -v -v --list -f backup-2.tar --listed-incremental /dev/null
drwxr-xr-x root/root        41 2007-09-28 15:02 backup/
D one
D three
R /backup/two
T /backup/three

drwxr-xr-x root/root         1 2007-09-28 15:02 backup/one/

drwxr-xr-x root/root         1 2007-09-28 15:02 backup/three/


-- 
Nicholas Cole
address@hidden




reply via email to

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