Dear all, I am trying to synchronize data from a remote machine (ssh) to my local one using rsync (pure scp would overwrite everything every time). The problem is, however, that due to the size of data and available storage, I have to distribute it over several hdd's. For that I have a script, which moves every single file (typical size ~ 4GB) to a different (randomly selected) hdd, leaving behind a symlink to the new location which has the same name as the original file. When, however, rsync is run again (I use -a option), it deletes all the links and downloads the corresponding files again. I tried -l (which is in -a, anyway, but I tried it explicitely, just for the case), -L and -K, but still I got the same behaviour. Is there a way to make rsync follow the symlinks at the target machine? Thank you very much in advance! Best regards, Yuriy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20120720/a4661bcb/attachment.html>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It sounds like you need lvm2 or whatever the equiv is for whatever OS you are running. Or maybe RAID (or both). On 07/20/12 13:10, Yuriy Davygora wrote:> Dear all, > > I am trying to synchronize data from a remote machine (ssh) to my > local one using rsync (pure scp would overwrite everything every > time). The problem is, however, that due to the size of data and > available storage, I have to distribute it over several hdd's. For > that I have a script, which moves every single file (typical size ~ > 4GB) to a different (randomly selected) hdd, leaving behind a > symlink to the new location which has the same name as the original > file. > > When, however, rsync is run again (I use -a option), it deletes > all the links and downloads the corresponding files again. I tried > -l (which is in -a, anyway, but I tried it explicitely, just for > the case), -L and -K, but still I got the same behaviour. > > Is there a way to make rsync follow the symlinks at the target > machine? > > Thank you very much in advance! > > Best regards, Yuriy > >- -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone: (407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. Kevin at FutureQuest.net (work) Orlando, Florida kmk at sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAJk0wACgkQVKC1jlbQAQcG1wCgyh/U+lyBP79LRDWaQgvxib/5 m9sAnRSZZ9yrio0FWcxTle+wHoQazs00 =LZlE -----END PGP SIGNATURE-----
Seen that, tried that, did not work, it deleted all my links and started downloading the files again. Apparently, judging by the title of this option it only follows directory symlinks, I have file symlinks. A little reading of my exact question might be appropriate, would it not? Anyway, I have found out that the md5sum tool follows symlinks, so I am writing my own bash script now to do what I want - without using rsync. So this feed can be closed. On 07/20/2012 08:09 PM, L. V. Lammert wrote: On Fri, 20 Jul 2012, Yuriy Davygora wrote: So, my question remains: can rsync somehow handle symlinks at the target machine, or should I use some other tools? A little Googling and/or RTFM would be appropriate, would it not? Check the man page on: --copy-dirlinks Or Google for an example: http://justaddwater.dk/2009/10/15/resolve-symlinks-when-copying-files-with-rsync/ Lee -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20120720/1cb5abbd/attachment.html>