fairdm.backups.media#

A media backup that does not archive the backups themselves.

Module Contents#

Classes#

SkippingMediaBackup

mediabackup that leaves the backup location out of the archive.

API#

class SkippingMediaBackup(*args, **kwargs)[source]#

Bases: dbbackup.management.commands.mediabackup.Command

mediabackup that leaves the backup location out of the archive.

When the backups and the media are in one S3 bucket, with the backups under the media storage’s location, an archive of the media would otherwise contain every earlier backup. The choice is made from the two storages’ configured bucket and location, so the bucket is never listed to decide it.

Initialization

skipped_prefix() → str[source]#

Return the media path that holds the backups, or an empty string.

Returns: The path of the backup location relative to the media storage, such as backups. Empty unless both storages are S3 storages in one bucket and the backup location is inside the media location.