Skip to content

Backups

Andy Byers edited this page Jul 19, 2017 · 2 revisions

Admin - Backups

You can run backups manually, by dumping out the relevent database and copying the files directory or, alternatively you can use the builtin backup command which has options of moving a zip file to a target location or uploading it into a S3 bucket.

Settings

There are three settings.py constants for the management of backups.

BACKUP_TYPE = 's3' # s3 or directory
BACKUP_DIR = '/a/directory/struct/dumps/'
BACKUP_EMAIL = True

If BACKUP_TYPE is set to s3 you must also set:

S3_ACCESS_KEY = 'ANACCESSKEY'
S3_SECRET_KEY = 'ANSECRETKEY'
S3_BUCKET_NAME = 'a-bucket'
END_POINT = 'eu-west-2'
S3_HOST = 's3.eu-west-2.amazonaws.com'

If BACKUP TYPE is set to directory you must set BACKUP DIR to an existing directory.

Management Command

Janeway comes with a builtin backup command, which calls the dumpdata command to output a JSON representation of your database and then zipping it together with a copy of the files and media directories. It can be called with:

python3 manage.py backup

Wiki has moved to read the docs.

Clone this wiki locally