Cross-server/client BACKUP command: rsync usage
Recently, we often need to deploy environments on a new server. Many things can be backed up directly from other servers without re-downloading and installing them.
The rsync command is used:
First, download rsync and install it on the "source server". take part in Baidu encyclopedia for the specific process.
Then configure the rsync. conf file in the "source server", which is usually in/etc/rsyncd. conf.
Add the following statement to the file:
[Liujian] path =/data1/liujian/uid = rootgid = rootread only = nohosts allow = 127.0.0.1/16 *****/255.255.255.0
Save and run the command: usr/bin/rsync -- daemon -- config =/etc/rsyncd. conf
Then run the following command on the target server: rsync-avzP root @**. **. **. **: liujian/data1/liujian/test/(where ****** is the "source server" IP address)
If there is no problem, the progress bar will be displayed.