Skip to content

Instantly share code, notes, and snippets.

@Austio
Forked from niraj-shah/s3cmd_sync.sh
Last active August 29, 2015 14:22
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 Austio/f6b389043d8435aeb74c to your computer and use it in GitHub Desktop.
Save Austio/f6b389043d8435aeb74c to your computer and use it in GitHub Desktop.
# Command Line to run from terminal
# Logs result to file s3_backup.log
# Command will run in the background
s3cmd sync -v /path/to/folder/ s3://s3-bucket/folder/ > s3_backup.log 2>&1 &
# Crontab command to sync folder to S3
# Command will run 1am every day and logs result to /root/s3_backup.log
0 1 * * * /usr/bin/s3cmd sync -rv /path/to/folder/ s3://s3-bucket/folder/ >> /root/s3_backup.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment