Rsync server deployment process
Rsync server deployment process:
1. rsync server configuration process
- Configure the rsync configuration file/etc/rsyncd. conf
- Create a local directory/Dingjian for synchronization and grant permissions as needed
Directory and/etc/rsync. Password Are the Path =/Dingjian/parameter configurations in the configuration file.
- Account Password File Configuration:
Echo "rsync_backup: Dingjian">/etc/rsync. Password
Chmod 600/etc/rsync. Password
Tip:
1)/etc/rsync. Password is the secrets file =/etc/rsync. password parameter configuration in the configuration file.
2) The account rsync_backup is/etc/rsync. Password, which is the configuration of the auth users = rsync_backup parameter in the configuration file.
4. Start the rsync Service
[[Email protected] Dingjian] # rsync -- daemon
[[Email protected] Dingjian] # echo "/usr/bin/rsync -- daemon">/etc/rc. Local
[[Email protected] Dingjian] # Cat/etc/rc. Local | grep daemon
[[Email protected] Dingjian] # ps-Ef | grep rsync
Restart
[[Email protected] Dingjian] # pkill rsync
[[Email protected] Dingjian] # rsync -- daemon
[[Email protected] Dingjian] # ps-Ef | grep rsync
Ii. Rsync client configuration process:
[[Email protected] etc] # echo "Dingjian">/etc/rsync. Password
Chmod 600/etc/rsync. Password
Tip:
/Etc/rsync of the client. password and/etc/rsync on the server. password does not have a task relationship, as long as the parameter-password-file =/etc/rsync connected to the client rsync command. match the path in password.
Iii. Operation Details of rsync client commands
Push the entire directory
Rsync-avz/tmp [email protected]: Dingjian -- password-file =/etc/rsync. Password
Only push files in the directory
Rsync-avz/tmp/[email protected]: Dingjian -- password-file =/etc/rsync. Password
Capture files in the directory corresponding to the rsync Module
Rsync-avz [email protected]: Dingjian -- password-file =/etc/rsync. Password/tmp
Rsync server deployment process