This is a backup script for Django projects. It’s able to automate backups to a local folder and a remote FTP server of both the database and files. It somewhat old and has a few limitations, mainly supporting only MySQL and not supporting the new way for specifying databases introduced in Django 1.2.
It’s loosly based on my WordPress backup script and inspired the database settings auto-detection found in the newer Wordrpess backup script.
Usage is simple:
$ django_backup /path/to/my/proj
$ django_backup --db-only /path/to/my/proj
The latter command only backups the database.
The script uses a few configuration variables in the top of the script to set the folder which the local backups are kept in and the remote FTP server settings. The database settings are extracted directly from the settings.py
of the backed-up project.
Continue reading Django Backup Script