Using rsync utility in linux to mirror a remote archive.
I figured it out that rsync is not enable by default. Follow the instruction below from LINK. I’ve had this exact same error and i resolved it using ubuntu rsync community page. I was missing the configuration of the rsync Daemon.
- Edit the file /etc/default/rsync to start rsync as daemon using xinetd. The entry listed below, should be changed from false to inetd.
RSYNC_ENABLE=inetd
- Install xinetd because it’s not installed by default.
$ sudo apt-get -y install xinetd
- Create the file /etc/xinetd.d/rsync to launch rsync via xinetd. It should contain the following lines of text.
service rsync { disable = no socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID flags = IPv6 }
- Create the file /etc/rsyncd.conf configuration for rsync in daemon mode. The file should contain the following. In the file, user should be replaced with the name of user on the remote machine being logged into.
max connections = 2 log file = /var/log/rsync.log timeout = 300 [share] comment = Public Share path = /home/share read only = no list = yes uid = nobody gid = nogroup auth users = user secrets file = /etc/rsyncd.secrets
- Create /etc/rsyncd.secrets for user’s password. User should be the same as above, with password the one used to log into the remote machine as the indicated user.
$ sudo vim /etc/rsyncd.secrets user:userpassword
- This step sets the file permissions for rsyncd.secrets.
$ sudo chmod 600 /etc/rsyncd.secrets
- Start/Restart xinetd
$ sudo /etc/init.d/xinetd restart