Last active
December 24, 2019 11:05
-
-
Save eercanayar/7a20ef8583ba6cceb2dd45191d1a805a to your computer and use it in GitHub Desktop.
this tiny script creates backups of django sqlite files
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
#! /bin/bash | |
now=$(date +%d%m%Y-%H.%M.%S) | |
filename=db.sqlite3.$now.zip | |
zip /home/ubuntu/backup-s3/$filename /home/ubuntu/django-prod/db.sqlite3 | |
aws s3 mv /home/ubuntu/backup-s3/$filename s3://django-db-backups | |
rm /home/ubuntu/backup-s3/$filename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment