Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'rsync doesn't work that way.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
rsync doesn't work that way.
Authored by: jk806 on May 18, '04 06:30:06PM

Hi,

As the author of that overly complicated perl script, I'd like to point out that the command you provide does _not_ actually work. Believe me, I'm much too sensible (read: lazy) to write complicated perl scripts when a one-line shell command will do it. I tried it with rsync before I wrote the thing.

Incidentally I also used cpio, which will create the hard link tree as well, but the perl script runs faster after the first run, as CPIO completely rewrites all the links every time, whereas the perl script only makes updates to things that have changed.

Go ahead and try the rsync on a small directory, and check the inodes and your disk space. You'll notice that what you actually get is a _real_ backup of your files, not a hard-link tree. Still, I'm not immune to mistakes... so just to make sure I didn't miss something the first time round... I used your command on just the Pictures folder within my home directory...

I did my ~/Pictures folder to ~/t1/

Results: (ls -i1 on files in both locations)

Computer [205]~>ls -i1 t1/Pictures/Finder*
1771681 t1/Pictures/Finder4.jpg
1771682 t1/Pictures/Finder5.jpg

Computer [206]~>ls -i1 Pictures/Finder*
1439742 Pictures/Finder4.jpg
1439743 Pictures/Finder5.jpg

Note the inodes are different. My disk space decreased, coincidentally, by the size of my pictures folder.

If you can find a way to make rsync actually do it, please post it.

jk806



[ Reply to This | # ]