Rsync another way, write a configuration file, put in etc, through a command to start him, it will listen to a port, the client and the server to communicate.
The configuration file IP for the remote machine is 192.168.1.117
The name of the configuration file, written as this, is automatically loaded without pointing.
[Email protected] ~]# vim/etc/rsyncd.conf
port=8730 Port default 873 to specify
Log file=/var/log/rsync.log Journal file
PID File=/var/run/rsync.pid Each process has a PID
[denny]/////////below is the specific module-related configuration, module name
Path=/tmp/rsync//////////////////the specific configuration. module corresponding to the directory, does not exist on the creation.
Use Chroot=yes///////////////yes is True no is false true equals yes false equals No. Limit find home directory when syncing
Max connections=4////Maximum number of connections
Read Only=yes///Specify Yes or no to specify read-only not allowed write. If you want to push, write No.
List=yes////is allowed to list the name of the module.
Uid=root///Synchronize data with which user's identity
Gid=root
Auth users=wangshaojun////user authentication
Secrets file=/etc/rs.passwd///password file, can be written casually
The hosts allow=192.168.1.118////specifies which machines can be connected.
[Denny1]
Path=/tmp/rsync123
Use Chroot=yes
Max Connections=4
Read Only=yes
List=yes
Uid=root
Gid=root
Hosts allow=192.168.1.1
Any conditions that are not specified later can be
///////////////////////////////////////////////////////////////////////////////////////////////
1. Save the configuration file.
2. Start the configuration file,
3. View the process
4. View Port
[Email protected] ~]# Mkdir/tmp/rsync
[Email protected] ~]# mkdir/tmp/rsync123
Create a Directory
Create a password file below
[Email protected] ~]# VIM/ETC/RS.PASSWD
Format is module name: Password wangshaojun:123aaa
Set permissions
[Email protected] ~]# chmod 400/etc/rs.passwd
/////////////////////////////////////////////////////////////////////////////////////
Local 118 connection Remote 117
Port connection error is not specified.
To view port conditions for a remote machine
Specified port connection copy succeeded
View the log.
Linux daily management-rsync backstage Service mode-1