Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Due to some space issues we replaced the images directory wit ha symlink by the same name images. It seems that my rsync command isn't following the symlink for the images directory. I have rsync 2.6.3. How do i get it to work as it hasn't backed up any images created since the switch over to the symlink?
From man rsync:
-a, --archive archive mode; same as -rlptgoD (no -H)
-l, --links copy symlinks as symlinks
-L, --copy-links transform symlink into referent file/dir
--copy-unsafe-links only "unsafe" symlinks are transformed
--safe-links ignore symlinks that point outside the tree
So you're telling rsync both -l (copy symlinks as symlinks) and -L (transform symlink into referent file/dir)
Well did you try without the -a option? I don't have the same version, but when I specified both -l and -L, I got the -l behaviour when I tried. Passing -k gave an error message - I don't know what it means.
Due to some space issues we replaced the images directory wit ha symlink by the same name images. It seems that my rsync command isn't following the symlink for the images directory. I have rsync 2.6.3. How do i get it to work as it hasn't backed up any images created since the switch over to the symlink?
I have tried -k and -K. It has a backup directory called images already, but its not continueing with the symlink content into that directory.
I had an unintended experience of the behavior you say you are looking for. This happened with rsync version 2.6.3, if I remember correctly. I was setting up a portable update mirror to use on systems with no internet connection and wound up with a huge download because I forgot to put a "-l" command in my command line. It seems that rsync defaults to following symlinks and copying them as files. The "-l" option told it to just copy them as links. The "-L" you've included should give what you want, though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.