sudo / --link-dest combination problem.

2005-06-17 Thread simon allfrey
Hi, using the attached script to implement an incremental rotating  
backup of my home directory
works fine if I run it myself, however if it is run as root the -- 
link-dest fails and all files are

recreated rather than linked to. Can someone explain the problem to me?

I'm using rsync version 2.6.5
on
Darwin Kernel Version 8.1.0 (OS X Tiger)

Thanks,
 Simon.


===
rm -rf /Volumes/Rotating backup/simonallfrey.6
mv -f /Volumes/Rotating backup/simonallfrey.5 /Volumes/Rotating  
backup/simonallfrey.6
mv -f /Volumes/Rotating backup/simonallfrey.4 /Volumes/Rotating  
backup/simonallfrey.5
mv -f /Volumes/Rotating backup/simonallfrey.3 /Volumes/Rotating  
backup/simonallfrey.4
mv -f /Volumes/Rotating backup/simonallfrey.2 /Volumes/Rotating  
backup/simonallfrey.3
mv -f /Volumes/Rotating backup/simonallfrey.1 /Volumes/Rotating  
backup/simonallfrey.2
mv -f /Volumes/Rotating backup/simonallfrey.0 /Volumes/Rotating  
backup/simonallfrey.1
/usr/local/bin/rsync -a --eahfs --link-dest=/Volumes/Rotating backup/ 
simonallfrey.1 /Users/simonallfrey /Volumes/Rotating backup/ 
simonallfrey.0/

===
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: sudo / --link-dest combination problem.

2005-06-17 Thread Wayne Davison
On Fri, Jun 17, 2005 at 12:32:06AM -0700, simon allfrey wrote:
 works fine if I run it myself, however if it is run as root the --
 link-dest fails and all files are recreated rather than linked to.

For files to be hard-linked together, they must be exactly the same in
all preserved attributes.  If you previously ran the script as a normal
user, some files were probably created with either the wrong user or the
wrong group from the originals (compared with what would be produced by
a run as root).  I would assume that this would solve itself going
forward because the root-run files would match other root-run files.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html