How to check file consistency across operating systems Its very stressful if we have to copy 2gb database dump or archive of important data over network. Even that TCP is supposed to let us send data without any damage it can happen from time to time while copying huge amounts of data through slow networks that some package gets damaged and crc checksum does not detect it (32 bit checksum still gives some chance of collision so the more packages the bigger the chance)
If you can not afford any risk use checksum validation before and after the transfer.
md5sum
If you are using linux systems on both side best choice is md5sum. This tool creates md5 hash of each file and generates it on the output so validation of single file is very easy
md5sum distr_backup_200903171527.tar
then on the second server we do the same and check the output
c215e634450d490341dd5c2c052cbe26a distr_backup_200903171527.tar
On debian install using apt, on mac using mac ports, finally on windows you can use this free 32 bit version (supports files over 7GB) md5sums for win32.
cfv
If we copy stuff from windows to linux or the other way around (especially using windows sharing protocols and samba) its worth to make a check as well. Problem is you dont have the tool like that on windows accessible so easily so then cvf comes to the rescue.
Idea is the same make sums of files on both sides and compare.
cfv -C distr_backup_200903171527.tar
This command will create a checksums file .svf which will hold all the checksums we want to count. Then copy files and svf file to the other machine and run
cfv distr_backup_200903171527.tar
It will find the svf file and look up the checksum there, it will also calculate checksum of the file again and see if they match.
On the windows just install total commander shareware (best application ever!!!) and go to Menu -> Files -> Create CRC (SVF format). Job done!
Comments
Post new comment