Created
August 16, 2016 16:28
-
-
Save hedleysmith/e09d5291f3a1fc12f5f3e953b7f9ea9d to your computer and use it in GitHub Desktop.
S3 Backup Cronjob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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