Hi, I am new to Rsync, but i have successfully used it to sync the contents between two machines. Now the requirement is to sync the contents which are symlinks. I need to sync the actual contents on client machine from these symlinks. I went through rsync tutorial and found --copy-links options to do my job i.e, to transform symlink into referent file/dir Issue: Rsync Server : The actual contents are in different location and the rsync path has the softlink to the actual contents. I need to sync the actual contents on the client machine. I used --copy-links option but it doesn't seem to be working. Even the log doesn't display any error. Command used to sync the contents on client side: --------------------------------------------------------------------------------------------------------------- #!/bin/bash RSYNC="/usr/bin/rsync" OPTS="--quiet --recursive -v --copy-links --perms --times -D --delete --timeout=300" SRC="rsync://10.10.10.x/portage" DST="/x/rsync/" echo "Started update at" `date` >> $0.log 2>&1 logger -t rsync "re-rsyncing the gentoo-portage tree" ${RSYNC} ${OPTS} ${SRC} ${DST} >> $0.log 2>&1 echo "End: "`date` >> $0.log 2>&1 --------------------------------------------------------------------------------------------------------------- If anyone has any idea how to sync the contents from symlinks kindly help me out.. Thanks In Advance.. Namitha. -------------- next part -------------- HTML attachment scrubbed and removed
Hi, I am new to Rsync, but i have successfully used it to sync the contents between two machines. Now the requirement is to sync the contents which are symlinks. I need to sync the actual contents on client machine from these symlinks. I went through rsync tutorial and found --copy-links options to do my job i.e, to transform symlink into referent file/dir Issue: Rsync Server : The actual contents are in different location and the rsync path has the softlink to the actual contents. I need to sync the actual contents on the client machine. I used --copy-links option but it doesn't seem to be working. Even the log doesn't display any error. Command used to sync the contents on client side: --------------------------------------------------------------------------------------------------------------- #!/bin/bash RSYNC="/usr/bin/rsync" OPTS="--quiet --recursive -v --copy-links --perms --times -D --delete --timeout=300" SRC="rsync://10.10.10.x/portage" DST="/x/rsync/" echo "Started update at" `date` >> $0.log 2>&1 logger -t rsync "re-rsyncing the gentoo-portage tree" ${RSYNC} ${OPTS} ${SRC} ${DST} >> $0.log 2>&1 echo "End: "`date` >> $0.log 2>&1 --------------------------------------------------------------------------------------------------------------- If anyone has any idea how to sync the contents from symlinks kindly help me out.. Thanks In Advance.. Namitha. -------------- next part -------------- HTML attachment scrubbed and removed
On Wed, Apr 11, 2007 at 10:30:41AM +0530, Namitha Rao wrote:> I went through rsync tutorial and found --copy-links options to do my > job i.e, to transform symlink into referent file/dirYes, --copy-links works fine, as long as rsync can actually get to the referent file. Since you're accessing an rsync daemon, I'd imagine that you have "use chroot" enabled (since that's the default) and that the links point outside the chroot area (which is not accessible, by definition). So, you'll either need to turn off chroot, or you'll need to transform the symlinks in the daemon area into files (which you could do by using a find command and copying the real files over the links, OR by changing the copy you used to populate that area to use rsync with the --copy-links option). Keep in mind that turning off chroot means that you won't be able to copy those out-of-chroot symlinks into the module using an rsync daemon (since they are considered to be unsafe). You'd need to either use a chroot rsync module for the inward copy and a non-chroot module for the outward copy, or use --copy-links for the inward copy. ..wayne..