Network-wide backup configuration
Section 1. How to deploy and build backup server: rsync service 1.1 rsync service deployment installation process linux system installation service flow: a download installation software yumb write configuration file c build directory / directory permissions for backup of service environment d startup service program boot automatically start e test service function 1.2 rsync daemon deployment mode
Rsync daemon server configuration:
The first course: download and install software rpm-qa | grep rsync yum install-y rsync second course: write configuration file vim / etc/rsyncd.conf # rsync daemon server configuration file # rsyncd.conf start##uid = rsync gid = rsync port = 873 fake super = yes use chroot = no max connections = 200pid file = / var/run/rsyncd.pid lock file = / var/run/rsync. Lock log file = / var/log/rsyncd.log ignore errors read only = false list = false hosts allow = 172.16.1.0 auth users 24 hosts deny = 0.0.0.0 backup dir by oldboy 32 auth users = rsync_backup secrets file = / etc/rsync.password [backup] comment = "backup dir by oldboy" path = / backup configuration file explanation
Man rsyncd.conf help command
Uid = rsync-specify the user who manages the backup directory gid = rsync-specify the user group port that manages the backup directory-define the network port number of the rsync backup service fake super = yes-disguise the rsync virtual user as a Super Admin user use chroot = no-- Security-related configuration Max connections = 200-- maximum number of connections: only 200 clients can connect to the backup server at a time timeout = 300-- timeout (in seconds) pid file = / var/run/rsyncd.pid-- record process number information 1. Let the program stop the process quickly 2. Determine whether a service is running lock file = / var/run/rsync.lock-- lock file log file = / var/log/rsyncd.log-- the log file of the rsync service is used for troubleshooting problems ignore errors-ignore simple errors in transfer read only = false-specify that the backup directory is Readable and writable list = false-enables the client to view module information on the server side hosts allow = 172.16.1.0 auth users 24-hosts allowed to transfer backup data (whitelist) hosts deny = 0.0.0.0mp 32-hosts (blacklist) prohibited from transferring backup data Rsync_backup-specify authentication user secrets file = / etc/rsync.password-specify authentication user password file user name: password information [backup]-module information comment = "backup dir by oldboy" path = / backup-configuration parameters in the module specify backup The third course of the directory: creating the virtual user useradd rsync-M-s / sbin/ nologin`` of the rsync service the fourth course: creating the backup service authentication password file echo "rsync_backup:oldboy123" > / etc/rsync.password chmod 600 / etc/rsync.password the fifth course: creating the backup directory and modifying the subordinate group information mkdir / backupchown rsync.rsync / backup/ the sixth course: starting the backup service systemctl start rsyncd systemctl enable rsyncd systemctl status rsyncd