Linux - to enable a RSync server

1. Enable the rsync (RSYNC_ENABLE=true) in target server (Debian)

nano /etc/default/rsync
change the RSYNC_ENABLE=false to RSYNC_ENABLE=true

2. Create the file /etc/rsyncd.conf

nano /etc/rsyncd.conf
append the following text, then save

pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsync.log

[rsync]
path = /rsync [path to the destination directory]
uid = root
gid = root
read only = no
list = yes
auth users = root
secrets file = /etc/rsyncd.secrets

3. Create the rsync share

mkdir /rsync [path to the destination directory]
Create the /etc/rsyncd.secrets
nano /etc/rsyncd.secrets
- append root:password, which is in the form username:password
Limit access to file owner
- chmod 600 /etc/rsyncd.secrets

4. Restart rsync

/etc/init.d/rsync restart

No comments:

Post a Comment