Introduction Incomplete or corrupted data transfers during cloud migration cause application errors in the new environment. Data integrity must be verified after transfer to ensure nothing was lost.
Symptoms - Application errors due to missing files - Database records missing after migration - File count mismatch between source and destination - Checksum mismatch for transferred files - Application reporting missing assets
Common Causes - Transfer interrupted by network issues - Transfer tool skipping files (permissions, symlinks) - Bandwidth throttling causing incomplete transfers - Race condition with files being modified during transfer - Transfer tool bug with specific file types
Step-by-Step Fix 1. **Verify data integrity after transfer': ```bash # Count files find /source -type f | wc -l find /destination -type f | wc -l # Compare checksums cd /source && find . -type f -exec md5sum {} \; | sort > /tmp/source.md5 cd /destination && find . -type f -exec md5sum {} \; | sort > /tmp/dest.md5 diff /tmp/source.md5 /tmp/dest.md5 ```
- 1.**Re-transfer missing files':
- 2.```bash
- 3.# rsync for incremental transfer
- 4.rsync -avz --checksum /source/ /destination/
- 5.# AWS DataSync
- 6.aws datasync create-task --source-location-arn <src-arn> --destination-location-arn <dst-arn>
- 7.
`