Like all serious data this blog needs to be save in case of disaster and as a cloud native app it should be able to be ran in every platform and to be operational after a backup restored. A Django backup is generaly a database dump coupled with a media files copy.
Instead of use a simple shell script using dump command, I prefered to look for a Django third app which make the job. I did a state of art of Django backup solution and here's a resume of it.
Thanks to Django Packages , an unofficial directory of Django third app by Pydanny and Audrey Roy. It really ease me for have informations about the existing packages. Their backup section contains 5 applications for deal with backup and restore, only 1 retains my attention:
Pluggable application for Django Web Framework that helps you to import/export fixtures via the automatically-generated administration interface.
It is basicaly a set of views and templates for manage fixtures with admin site.
My opinion: I don't want to play with fixtures because serialization/deserialization is very time-consuming.
Backup, compress and restore database and media files. Transfer them via email or FTP and maintain a set number of dated versions on remote FTP server.
Command line allowing to dump PostgreSQL and MySQL, compress and zip encrypt your backup. Backups are stored localy and sent via FTP or email.
My opinion: I don't want to play with FTP, too old school neither with email, 2GB dumps can't be sent.
Back up your databases and media directory to a local file/directory or Amazon Glacier. Works with PostgreSQL, MySQL and sqlite.
Fork of Django-Backup which upload to Glacier.
My opinion: Great but I want play with more services than AWS glacier.
Dumps and loads both the database and the media files.
Command line tool supporting only Postgres and store locally on filesystem.
My opinion: Too basic and last commit on 2013.
Management commands to help backup and restore your project database and media files with various storages such as Amazon S3, DropBox or local file storage.
Command line tools for backup PostgreSQL, MySQL, SQLite. It can compress with Gzip and encrypt with GPG. Files are stored by using a Django Storage class so many storage services are available and development of a new one is relatively simple.
It is the solution I choose but there are many things I must improve before use it:
- There was no tests to ensure I can use it safety (done)
- There's not yet media restore, for now I think it is easy to untar a tarball
- It needs an system for use a custom DB connector not only those provided
- Full Python 3 support
This may sound like an ad, but Django Dbbackup seems to be the best solution, it is actually under heavy development and I think the next release will come as a full operational tool. I will wirte more entries about this Django app where I am an active maintener.