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. 1.**Re-transfer missing files':
  2. 2.```bash
  3. 3.# rsync for incremental transfer
  4. 4.rsync -avz --checksum /source/ /destination/
  5. 5.# AWS DataSync
  6. 6.aws datasync create-task --source-location-arn <src-arn> --destination-location-arn <dst-arn>
  7. 7.`

Prevention - Use tools with built-in verification (rsync, rclone) - Transfer in stages: historical data first, delta before cutover - Verify checksums after every transfer - Monitor transfer progress with detailed logging - Plan for re-transfer of any missing data