2

I'm trying to wrap my head around rsync behaviour when using --link-dest as my personal backup.

My setup is a Mac Pro with a separate data partition which I want to backup to an ubuntu server. Trying this with Time machine did not work out so far (last issue: wrong max target size of 46 GB).

I got the whole thing working with rsync over ssh and that's fine for me.

Last thing I tried was to make incremental backups using the --link-dest option. I got it working via ssh (201_10_08 is a full backup)

rsync -avh --delete --link-dest=/mnt/backup_data/2014_10_08 /Volumes/Data/ user@host:/mnt/backup_data/2014_10_09

This works just fine with the --link-dest path pointing to the folder on the target system.

Now I tried to simplify this by defining backup_data as a Samba drive and mounting it from the Mac (updated rsync to 3.0.9 on the mac due to slow performance over samba of old version).

Result: Despite the same modification date, owner and group of the files on the mounted drive (as verified by stat), subsequent backups generate full backups and no hard links on the target system

I tried --link-dest=/mnt/backup_data/old (result: path could not be found, which makes sense since access is only to smb share not the whole target system) as well as --link-dest=/Volume/mount/old (with path via smb mount on mac, result: no hard links, full backup).

I can work with the solution I worked out, but I would like to understand the behaviour.

Anyone ideas?

2
  • 1
    Samba is emulating a Windows file server, you can't create Unix hard links on a share.
    – Sacha K
    Oct 9, 2014 at 10:54
  • 1
    I see. I thought it might be something fundamental as this. Thanks for clarifying.
    – user247309
    Oct 9, 2014 at 20:12

1 Answer 1

3

IIRC the rsync version shipped with OS X is not the most current one and you could be running into the following issue:

Note that rsync versions prior to 2.6.1 had a bug that could prevent --link-dest from working properly for a non-super-user when -o was specified (or implied by -a). You can work-around this bug by avoiding the -o option when sending to an old rsync.

2
  • This is another reason why I upgraded to rsync 3.0.9 on the mac. This is verified.
    – user247309
    Oct 9, 2014 at 10:53
  • I overlooked that nugget in your original question. The comment by @user2210761 seems spot on.
    – HBruijn
    Oct 9, 2014 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .