Currently i only RSync-ing the Directories as like:
* * * * * rsync -avz /var/www/public_html/images root@<remote-ip>:/var/www/public_html
So how do i rsync one single file like, /var/www/public_html/.htaccess ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You do it the same way as you would a directory, but you specify the full path to the filename as the source. In your example:
As mentioned in the comments: since
-aincludes recurse, one little typo can make it kick off a full directory tree transfer, so a more fool-proof approach might to just use-vz, or replace it with-lptgoD.