Created
March 8, 2011 18:02
-
-
Save robhudson/860665 to your computer and use it in GitHub Desktop.
One-liner for cron to backup a Django project to S3 using dumpdata
This file contains 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
# Assumptions: | |
# | |
# Assumes boto is installed which comes with the s3put command | |
# | |
# Assumes your S3 keys are in ~/.boto in the form: | |
# | |
# [Credentials] | |
# aws_access_key_id = XXX | |
# aws_secret_access_key = XXX | |
# | |
/path/to/python /path/to/project/manage.py dumpdata [app1 app2 ...] | gzip > /tmp/dump.json.gz && /path/to/s3put -b [bucket-name] /tmp/dump.json.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment