How to troubleshoot Rsync in Linux operation and maintenance?

Rsync is an open source, fast, multi-functional, excellent tool that can realize full and incremental local or remote data synchronization backup. It is also one of the essential skills of operation and maintenance personnel . So how do operators perform Rsync troubleshooting when operating and deploying the architecture?

1 Necessary ideas for troubleshooting 

1) Proficient in deployment process steps

2) Understanding the principle of rsync

3) Learn to read logs, rsync command line output, log file /var/log/rsyncd.log

2 Troubleshooting ideas 

2.1 rsync server troubleshooting ideas

1) Check whether the rsync service configuration file path is correct. The correct default path is: /etc/rsyncd.conf

2) Check the host allow , host deny in the configuration file, whether the allowed ip network segment allows the client to access the ip network segment

3) Check whether the path in the path parameter in the configuration file exists and whether the permissions are correct (normally, it should be the owner and group corresponding to the UID parameter in the configuration file)

4) To check whether the rsync service is started, check the command: ps -ef|grep rsync. Will the port exist netstat -ntlpu|grep 873

5) Check whether the iptables firewall and selinux are enabled to allow the rsync service to pass through, or consider closing them

6) Check whether the password file configured by the server rsync is 600 permissions and the format is correct, the correct format username: password, the file path and the secrect file in the configuration file should be the same

7) If you are pushing data , check whether the user in the configuration rsyncd.conf file has read and write permissions to the directory under the module

2.2 rsync client troubleshooting ideas

1) Check whether the password file configured by the client rsync has the permission of 600, and whether the format of the password file is correct. Note: only the password is required, and it is the same as the server password.

2) Use telnet to connect to the rsync server ip address 873 port, and check whether the service is started (you can test whether the server firewall is blocked). telnet 172.16.1.41 873

3) When the client executes the command rsync -avzP [email protected]::backup/ /test/ --password-file=/etc/rsync.password

The details of this command should be remembered clearly, especially the double colon at 172.16.1.41::oldboy/test/ and the following oldboy are the module name

After sharing, I hope it can help those in need. Linux is now deeply loved by Internet companies . If you want to stand out from many IT workers , you need to have superb technology, and learning to add value is essential. The road to learning is about perseverance. The old boy education Linux cloud computing operation and maintenance course, 10 years of technical precipitation, put an end to the paper, the whole enterprise real cases combined with theory teaching, if you want to learn the knowledge of Linux cloud computing operation and maintenance in depth, you can pay attention to the old boy education.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325266045&siteId=291194637