management.models.backup ======================== .. py:module:: management.models.backup .. autoapi-nested-parse:: Backup Options Model. Module Contents --------------- .. py:class:: BackupOptions(*args, **kwargs) Bases: :py:obj:`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. .. py:class:: AuthMethod(*args, **kwds) Bases: :py:obj:`django.db.models.TextChoices` Authentication methods for backup options. .. py:attribute:: PASSWORD :value: ('password', 'Password') .. py:attribute:: SSH_KEY :value: ('ssh_key', 'SSH Key') .. py:attribute:: enable_sftp_storage .. py:attribute:: host .. py:attribute:: port .. py:attribute:: user .. py:attribute:: auth_method .. py:attribute:: password .. py:attribute:: private_key .. py:attribute:: key_passphrase .. py:attribute:: remote_directory .. py:class:: Meta Meta options for the BackupOptions model. .. py:attribute:: verbose_name :value: 'Backup Option' .. py:method:: save(*args, **kwargs) Ensure only one instance exists (singleton pattern). .. py:method:: clean() Prevent the creation of more than one instance.