Package: rsync
Version: 3.0.9-3
Severity: important

Hello,

I've accidentally noticed that my home directory backups (done using 
rsync and --link-dest set to last backup directory) are taking up
much more space than expected. Investigation revealed that the 
unchanged files are actually not hard-linked, as I would expect.

Here's a small demo:

jurij@paddy:~/tmp$ mkdir src
jurij@paddy:~/tmp$ touch src/foo
jurij@paddy:~/tmp$ rsync -r /home/jurij/tmp/src/ link
jurij@paddy:~/tmp$ ls -al link
total 8
drwxr-xr-x 2 jurij jurij 4096 Aug  4 10:13 .
drwxr-xr-x 4 jurij jurij 4096 Aug  4 10:13 ..
-rw-r--r-- 1 jurij jurij    0 Aug  4 10:13 foo
jurij@paddy:~/tmp$ rsync -r --link-dest /home/jurij/tmp/link 
/home/jurij/tmp/src/ dst
jurij@paddy:~/tmp$ ls -al dst
total 8
drwxr-xr-x 2 jurij jurij 4096 Aug  4 10:13 .
drwxr-xr-x 5 jurij jurij 4096 Aug  4 10:13 ..
-rw-r--r-- 1 jurij jurij    0 Aug  4 10:13 foo
jurij@paddy:~/tmp$ stat dst/foo
  File: `dst/foo'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 807h/2055d      Inode: 1572876     Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/   jurij)   Gid: ( 1000/   jurij)
Access: 2012-08-04 10:13:46.007097660 +0100
Modify: 2012-08-04 10:13:46.007097660 +0100
Change: 2012-08-04 10:13:46.007097660 +0100
 Birth: -
jurij@paddy:~/tmp$ 

As you can see, the file dst/foo has link count of 1, and I would 
expect it to be 2, as it should be just hardlinked to link/foo. In 
case it matters, /home is its own partition, with ext4 filesystem. 
Corresponding line from mount output (all options are default, as set 
during install):

/dev/sda7 on /home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)

I'm pretty sure that it used to work before, I've been doing the 
backups the same way for a couple of years, and older backups do have 
files hard-linked, as expected. If this bug is confirmed, I would 
expect its severity to be bumped to RC.

Best regards,
-- 
Jurij Smakov                                           ju...@wooyd.org
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to