Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to verify transmitted data #668

Open
xjie0626 opened this issue Nov 20, 2024 · 3 comments
Open

How to verify transmitted data #668

xjie0626 opened this issue Nov 20, 2024 · 3 comments

Comments

@xjie0626
Copy link

I have already passed some data from server A to server B through the rsync command. Do I have any commands to verify the data from both servers and determine if they are correct?

@lighterCoder
Copy link

To check if the transmition is correct.

  • Use tools such as md5sum or sha256sum)
    compare the checksums of source and destination directory
  1. find /path/to/source -type f -exec md5sum {} + > source_checksums.md5
  2. find /path/to/destination -type f -exec md5sum {} + > destination_checksums.md5
  3. diff source_checksums.md5 destination_checksums.md5
  • It should be correct if there is no output.

Or compare the directories' structure by diff -rq source/ destination/.

@xjie0626
Copy link
Author

xjie0626 commented Jan 9, 2025

thanks

@headbank
Copy link

Also you could just re-run your rsync command (with -c switch if you want total verification).

Of course if anything is transferred on the 2nd run, you need to do a 3rd, ... n-th run until there is nothing transferred :P

It would actually be good though if rsync added a switch allowing to re-use the checksums it sends for verifying transfers, to also verify the files written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants