fairdm.backups.management.commands.backup#

Back up the database and the media now, in the foreground.

Writes the same backups the scheduled tasks write, to the same place, and removes the oldest beyond BACKUP_KEEP. A failure ends the command with an error.

Usage::

python manage.py backup
python manage.py backup --database-only
python manage.py backup --media-only

Module Contents#

Classes#

Command

Write a database backup, a media backup, or both.

API#

class Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]#

Bases: django.core.management.base.BaseCommand

Write a database backup, a media backup, or both.

Initialization

help#

‘Back up the database and the media now.’

add_arguments(parser)[source]#

Add the options that limit the backup to one kind.

handle(*args, **options)[source]#

Run each requested backup.