Verifying S3 uploads


I just archived a bunch of old photo stuff from Aperture into S3/Glacier, and I wanted to make sure everything uploaded correctly before I deleted my local copy.

Here’s a script which will compare the checksums for all the files in the current directory with those in S3. It will report missing files and mismatched checksums. Pass it the name of the bucket and the prefix it should look in as parameters.

You will need:

  • s3md5 from antespi/s3md5
  • Valid AWS credentials somewhere awscli can find them

Script:

e.g. ./compare-bucket.sh my-archive-bucket aperture_photos