SETTING UP RSYNC FOR FILE SYNCHRONISATION
August 8, 2016 / by Marco / Categories : Technology, Websites, Windows
The first thing to do is check to see whether you have rsync installed on your VPS. Just type rsync. If it comes back with:
[root@test ~]# rsync
rsync version 3.0.6 protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site: rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
Then you know rsync is installed. If it returns an invalid command then you know you need to install it. To install rsync just use the following command:
yum -y install rsync
Generate the SSH key gen for a password-less login
ssh-keygen -t rsa

Accept all default settings
Copy the ssh keys to the remote server
ssh-copy-id user@x.x.x.x
or paste the keys in ssh:
cat .ssh/id_rsa.pub | ssh root@x.x.x.x 'cat >> .ssh/authorized_keys'
![]()
Then run the rsync to synchronise the files. It’s always from source to destination so the below command needs to run from the server that you have the files you wish to copy.
rsync -avuzr --update --delete --rsync-path=/usr/bin/rsync /web/backups/ root@xxx:/web/backups
If you encounter the following error message when you run RSYNC then proceed reading to see the solution:
bash: /usr/bin/rsync: No such file or directory
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: remote command not found (code 127) at io.c(600) [sender=3.0.6]
The fix was to install rsync on the remote server. You may have read in a few articles that rsync is not required on the remote server but in my case it was needed. It was the only way to fix the problem.
OTHER ARTICLES YOU MAY LIKE
CHATGPT USEFUL FEATURE: TEMPORARY CHAT
Everyday use of ChatGPT naturally trains you to think in threads. You ask a question, you get an answer, you refine the prompt, and the conversation accretes context. It’s one of the reasons ChatGPT feels more like a companion than a search box: it remembers what you said so it can respond appropriately next time […]
read more
HOW TO GET FREE UPGRADE TO PERPLEXITY.AI PRO FOR 12 MONTHS AND TESTING PRO FEATURES
If you spend time researching, comparing, or synthesising information online, you have probably encountered Perplexity.ai — a research-focused assistant that blends large language models with live web search and citation trails. The Pro plan supercharges that experience with priority access to powerful models, higher usage limits, and premium capabilities baked directly into the interface. Right […]
read more
