Lab Environment:
Backup server:192.168.160.101
Node1 server:192.168.160.245
Experimental purpose: Implement NODE1 scheduled incremental backups to backup server
Add two domain name resolution via local Hosts file (two all to do) synchronize data via domain name more intuitive!
Backup server:
Ping test:
Node1 Server:
Ping test:
Install Rsync: (both server and client are installed)
Yum Install-y rsync
Writing the rsyncd.conf configuration file
To create a new shared backup file:
To add rsync users:
Add rsync to the System daemon: (Rsync is using port 873)
The/backup file belongs to the group, the main change to rsync user-R means that all files and directories are inherited from the group, the master
Create a virtual user and password file and set the file permissions to 600 (for security)
Write the rsync process to the startup key:
Firewall and SELinux release related services:
Node1 Server:
Create password file password to be consistent with backup server side! and set the permission to 600
The test is pushed from the Node1 to backup:
To create the Node1 directory on Node1:
and create five files in the Node1 file:
Push the Node1 directory to the backup directory on backup server:
Synchronization succeeded, test incremental sync
Continue to create a file on Node1
Push again
Incremental synchronization is successful, view the backup backups directory on backup server
Adding the--passwordp-file=/etc/rsync.password parameter allows you to synchronize data without entering a password:
Automated Backup:
Incremental backup daily 0 o'clock/node1/directory
rsync Data Backup Synchronization daemon (socket) mode