-   Linux - Newbie (
-   -   How to check file integrity after transfer (

khandu 06-03-2012 07:00 PM

How to check file integrity after transfer
Hey Guys

So here is the scenario. Going to do transfer of huge files in a directory via either scp or rsync (You can suggest) from one server to another remote server. We need to check the data integrity of the file. What is the best way to do it?

The OS is RHEL5 on both servers.. The folder has few files in it - around 10-20 of them .. We cannot zip the whole folder and send it as one file.. as the files itself inside them are quite huge and they are individually gzipped with compression 9 themselves .. but if highly recommended than we can do that..

What I can think of is


md5sum localfolder/
scp localfolder/ remotesite:
login to remotesite
md5sum localfolder/ (on remote site)
compare manually hash of each file in the folder

Now ofcourse I was looking for

1) md5sum localfolder/ does not works
2) easy way to dump all files md5sum in a file, scp that file as well and then run a command to compare against the file??
3) overall easy way to do this or less commands or more cleaner way if possible

Can someone help on what should be the exact steps here to make sure data got across properly!!


chrism01 06-03-2012 07:10 PM

rsync using ssh transport. rsync does chksums automatically to ensure a clean copy.
I think ssh may do the same, its pretty solid.
The main difference is ssh only copies entire files, rsync will copy differences.
rsync is mainly used to update files.

All times are GMT -5. The time now is 09:42 AM.