Installing rsync
Perform the following command installation:
Apt-get install-y rsync
You can then use the following command to see which files are installed:
Dpkg-l rsync
Configuring Rsync
Modify the corresponding content in the configuration file/etc/default/rsync as:
Rsync_enable=true
Add the configuration file/etc/rsyncd.conf, as follows:
Port = 873
UID = root
GID = root
Use chroot = yes
Read Only = yes
Hosts allow=204.74.0.0/255.255.0.0
Hosts deny=*
Max connections = 5
Log file =/var/log/rsyncd.log
Log format =%t%a%m%f%b
Syslog facility = Local3
Timeout = 300
[Public]
Path =/home/pics/www
List=yes
Ignore errors
Auth users = Pics
Secrets file =/etc/rsyncd.secrets
Comment = Pics www
Create a file/etc/rsyncd.secrets content is a user name and password, such as:
Pics:mypassword
Then execute the following command:
chmod 700/etc/rsyncd.secrets
This is configured so that you can start the Rsync server by running the following command:
/etc/init.d/rsync restart
Rsync Client
The rsync command can be used on the client side, such as:
Rsync Rsync://[email Protected]/public
rsync--password-file=/etc/rsync.password rsync://[email protected]/public/home/pics/www--recursive--times--links --hard-links--delete-av
Configure Rsync server on Ubuntu VPS