Data Backup-rsync Remote connection
Prepare two Linux hosts (Host1 and Host2)
I use host1 as the server side, which is the remote machine.
Host2 as a local machine
On the remote machine Host1
1) #vi/etc/rsyncd.conf (config edit file)
In edit mode I
Uid=root (the UID to which the backed up file belongs)
Gid=root (the backup file belongs to the GID)
Log File=/var/log/rsyncd.log (the operation will be recorded in the log file)
PID file=/var/run/rsyncd.pid (Process PID service)
[TXT] (module)
path=/tmp/(The specified path, copied under the specified path)
Use Chroot=yes or no (when Yes, path specifies that the paths are limited to/tmp.) If there is no way to copy the link file to take effect, no means you can copy the linked files.
List=yes to see how many modules
SECRETS=/ETC/RSYNCD.PASSWD (the password for the specified txt)
Max Connections=4 (up to 4 links)
Read Only=no (readonly, no indicates readable and writable)
Auth users=txt (using txt)
: Wq
vi/etc/rsyncd.passwd
In edit mode I
Txt:txt123
: Wq
chmod 600/etc/rsyncd.passwd
The daemon is turned on (the key part, otherwise it will not be effective)
Rsync--daemon-config=/etc/rsyncd.conf (Specify daemon path)
Available via NETSTAT-LNP |grep 873
See if your rsync service is turned on
The default open port for Rsync is 873
3. Then I create the Liu directory under/tmp and create 1.txt 2.txt in the Liuu directory.
Mkdir/tmp/liu
Touch 1.txt 2.txt
4. Copy the remote machine host1 (copy to local/TMP/11) on Host2
Rsync-avzp 192.168.1.1::/LIU/TMP/11
Enter Password txt123
Copy succeeded
Cd/tmp/11
Ls
This post is for reference only, also need further study please move to Http://www.apelearn.com/bbs/forum.php?mod=viewthread&tid=9291&highlight=rsync
This article from the "Linux Learning Space" blog, reproduced please contact the author!
After rsync mode service explained