Package: django-dbbackup
Django Database BackupThis Django application provides management commands to help backup and
restore your project database and media files with various storages such as
Amazon S3, Dropbox, local file storage or any Django storage.It is made to:Allow you to secure your backup with GPG signature and encryptionArchive with compressionDeal easily with remote archivingKeep your development database up to dateUse Crontab or Celery to setup automated backupsDocsSee our official documentation atRead The Docs.Why use DBBackupThis software doesn’t reinvent the wheel, in a few words it is a pipe between
your Django project and your backup storage. It tries to use the traditional dump &
restore mechanisms, apply compression and/or encryption and use the storage system you desire.It gives a simple interface to backup and restore your database or media
files.Management CommandsdbbackupBackup your database to the specified storage. By default this will backup all
databases specified in your settings.py file and will not delete any old
backups. You can optionally specify a server name to be included in the backup
filename.Usage: ./manage.py dbbackup [options]

Options:
  --noinput             Tells Django to NOT prompt the user for input of any
                        kind.
  -q, --quiet           Tells Django to NOT output other text than errors.
  -c, --clean           Clean up old backup files
  -d DATABASE, --database=DATABASE
                        Database to backup (default: everything)
  -s SERVERNAME, --servername=SERVERNAME
                        Specify server name to include in backup filename
  -z, --compress        Compress the backup files
  -e, --encrypt         Encrypt the backup files
  -o OUTPUT_FILENAME, --output-filename=OUTPUT_FILENAME
                        Specify filename on storage
  -O OUTPUT_PATH, --output-path=OUTPUT_PATH
                        Specify where to store on local filesystem
  -x EXCLUDE_TABLES, --exclude-tables=EXCLUDE_TABLES
                        Exclude tables data from backup (-x 'public.table1, public.table2')dbrestoreRestore your database from the specified storage. By default this will lookup
the latest backup and restore from that. You may optionally specify a
servername if you you want to backup a database image that was created from a
different server. You may also specify an explicit local file to backup from.Usage: ./manage.py dbrestore [options]

Options:
  --noinput             Tells Django to NOT prompt the user for input of any
                        kind.
  -d DATABASE, --database=DATABASE
                        Database to restore
  -i INPUT_FILENAME, --input-filename=INPUT_FILENAME
                        Specify filename to backup from
  -I INPUT_PATH, --input-path=INPUT_PATH
                        Specify path on local filesystem to backup from
  -s SERVERNAME, --servername=SERVERNAME
                        Use a different servername backup
  -c, --decrypt         Decrypt data before restoring
  -p PASSPHRASE, --passphrase=PASSPHRASE
                        Passphrase for decrypt file
  -z, --uncompress      Uncompress gzip data before restoringmediabackupBackup media files by get them one by one, include in a TAR file.Usage: ./manage.py mediabackup [options]

Options:
  --noinput             Tells Django to NOT prompt the user for input of any
                        kind.
  -q, --quiet           Tells Django to NOT output other text than errors.
  -c, --clean           Clean up old backup files
  -s SERVERNAME, --servername=SERVERNAME
                        Specify server name to include in backup filename
  -z, --compress        Compress the archive
  -e, --encrypt         Encrypt the backup files
  -o OUTPUT_FILENAME, --output-filename=OUTPUT_FILENAME
                        Specify filename on storage
  -O OUTPUT_PATH, --output-path=OUTPUT_PATH
                        Specify where to store on local filesystemmediarestoreRestore media files from storage backup to your media storage.Usage: ./manage.py mediarestore [options]

Options:
  --noinput             Tells Django to NOT prompt the user for input of any
                        kind.
  -q, --quiet           Tells Django to NOT output other text than errors.
  -i INPUT_FILENAME, --input-filename=INPUT_FILENAME
                        Specify filename to backup from
  -I INPUT_PATH, --input-path=INPUT_PATH
                        Specify path on local filesystem to backup from
  -e, --decrypt         Decrypt data before restoring
  -p PASSPHRASE, --passphrase=PASSPHRASE
                        Passphrase for decrypt file
  -z, --uncompress      Uncompress gzip data before restoring
  -r, --replace         Replace existing filesTestsTests are stored indbbackup.testsand to run them you must launch:python runtests.pyIn fact,runtests.pyacts as amanage.pyfile and all Django commands
are available. So you could launch:python runtests.py shellto get a Python shell configured with the test project. Also all test
command options are available and usable to run only a selection of tests.
SeeDjango test command documentationfor more information about it.There are even functional tests:./functional.shSee documentation for details.To run the tests across all supported versions of Django and Python, you
can use Tox. Firstly install Tox:pip install toxTo run the tests just use the commandtoxin the command line.  If you
want to run the tests against just one specific test environment you can runtox-e<testenv>.  For example, to run the tests with Python3.9 and
Django3.2 you would run:tox -e py39-django32The available test environments can be found intox.ini.ContributingThis is aJazzbandproject. By contributing you agree
to abide by theContributor Code of Conductand follow theguidelines.All contribution are very welcomed, propositions, problems, bugs and
enhancement are tracked withGitHub issuessystem and patches are submitted
viapull requests.We use GitHub Actions as continuous integration tools.