fairdm.backups.run#
Run one backup of the database or the media.
Module Contents#
Functions#
Write one backup and remove the oldest beyond the count to keep. |
API#
- run_backup(kind: Literal[database, media]) None[source]#
Write one backup and remove the oldest beyond the count to keep.
The backup is encrypted to
BACKUP_PUBLIC_KEYwhen it is set. Any failure propagates, so a scheduled run fails rather than reporting a backup it did not make.Args: kind:
"database"for a dump of the database,"media"for an archive of the media files.Raises: Exception: Whatever the backup raises, such as a failed dump or a key that cannot encrypt.