Skip to content

Instantly share code, notes, and snippets.

@hedleysmith
Created August 16, 2016 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedleysmith/e09d5291f3a1fc12f5f3e953b7f9ea9d to your computer and use it in GitHub Desktop.
Save hedleysmith/e09d5291f3a1fc12f5f3e953b7f9ea9d to your computer and use it in GitHub Desktop.
S3 Backup Cronjob
# First, install the Amazon AWS CLI https://aws.amazon.com/cli/
# Then, add the following crontab by running `crontab -e` - this will backup file.ext every hour.
0 * * * * /usr/local/bin/aws s3 cp /path/to/back/file.ext s3://bucket-name/file.$(date +\%Y\%m\%d\%H\%M\%S).ext > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment