--link-dest doesn't work

Tony VanScoy tvanscoy at gmail.com
Wed Sep 29 16:04:21 GMT 2004

i want to backup a website every day, but only get the changed files. 
Otherwise just hard link to yesterdays file.  So I'm trying
--link-dest.  here is the script (backup.sh) I'm trying to use....

if [ -z "$1" ]; then
        echo usage: $0 rsync_module

NEW_BACKUP=$BACKUP_DIR/`date +%m-%d-%Y`
OLD_BACKUP=$BACKUP_DIR/`date -d "-1 day" +%m-%d-%Y`

rsync -a -e ssh --delete --link-dest=$OLD_BACKUP --exclude access_log
--exclude error_log root at treedesign.com::$1 $NEW_BACKUP

... This script runs fine without any errors, but look at the i-node
numbers.  not the same. its not hard linking.

$ ./backup.sh example.com && cd /home/user/backups/sites/example.com && ls
09-27-2004  09-28-2004  09-29-2004

$ ls -i 09-27-2004/index.html 
1082520 09-27-2004/index.html

$ ls -i 09-28-2004/index.html 
1140043 09-28-2004/index.html

$ ls -i 09-29-2004/index.html 
1145287 09-29-2004/index.html

... so what am i doing wrong?  i use absolute paths with --link-dest,
but i've also tried relative paths like --link-dest=../09-28-2004 with
no success.  any pointers would be great.

by the way, i used the some rsync line on OSX/BSD and it hard links
every time.  here's my info

$ uname -r -m -p -o i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GNU/Linux

$ rsync --version
rsync  version 2.6.0  protocol version 27

thanks in advance for any info

More information about the rsync mailing list