Skip to content

Instantly share code, notes, and snippets.

@gordonmurray
Last active April 15, 2016 11:14
Show Gist options
  • Save gordonmurray/a6e7190b8455da76adf32f490f4bc96b to your computer and use it in GitHub Desktop.
Save gordonmurray/a6e7190b8455da76adf32f490f4bc96b to your computer and use it in GitHub Desktop.
Handy CLI Commands
# Sync 2 S3 buckets
aws s3 sync s3://{source} s3://{destination}
# Determine size of an S3 bucket
aws s3api list-objects --bucket {s3_bucket_name} --output json --query "[sum(Contents[].Size), length(Contents[])]"
# dump large mysql DB > tested on 200gb DBs
mysqldump -h {HOST} -u {USER} -p {TABLE} --single-transaction --default-character-set=utf8 --quick --extended-insert > {FILENAME}.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment