moneyslow.com

ubuntu下增加rsync服务并设置为自启动

如何修改ubuntu18默认Nano编辑器为vi

如何修改ubuntu18默认Nano编辑器为vi

Step 1 – Install rsync
Install rsync with apt command
sudo apt-get -y install rsync

Step 2 – Configure rsync daemon
Configure rsync config using nano , it will automatically create file if not exist
vi /etc/rsyncd.conf

[backup]
# destination directory
path = /home/backup
# hosts you allow to access, only allow ip 192.168.1.100
hosts allow = 192.168.1.100
# deny all host
hosts deny = *
list = true
# user permission
uid = root
#group permission
gid = root
#can write to this directory
read only = false
Step 3 – Start and enable at booting

After you configure in Step 2 , we will start the rsync daemon and automatically make it start when server boot
Start the daemon

sudo systemctl start rsync
sudo systemctl enable rsync

Exit mobile version