management.models.backupΒΆ

Backup Options Model.

Module ContentsΒΆ

class management.models.backup.BackupOptions(*args, **kwargs)[source]ΒΆ

Bases: django.db.models.Model

A singleton model (we always operate with pk=1) for backup settings.

We store host/port/user/local_storage, plus either a password or an SSH key.

class AuthMethod(*args, **kwds)[source]ΒΆ

Bases: django.db.models.TextChoices

Authentication methods for backup options.

PASSWORD = ('password', 'Password')[source]ΒΆ
SSH_KEY = ('ssh_key', 'SSH Key')[source]ΒΆ
enable_sftp_storage[source]ΒΆ
host[source]ΒΆ
port[source]ΒΆ
user[source]ΒΆ
auth_method[source]ΒΆ
password[source]ΒΆ
private_key[source]ΒΆ
key_passphrase[source]ΒΆ
remote_directory[source]ΒΆ
class Meta[source]ΒΆ

Meta options for the BackupOptions model.

verbose_name = 'Backup Option'[source]ΒΆ
save(*args, **kwargs)[source]ΒΆ

Ensure only one instance exists (singleton pattern).

Parameters:
  • args (Any)

  • kwargs (Any)

Return type:

None

clean()[source]ΒΆ

Prevent the creation of more than one instance.

Return type:

None