2023-01-23 13:43:18 +00:00
|
|
|
"""
|
|
|
|
An abstract class for BackBlaze, S3 etc.
|
|
|
|
It assumes that while some providers are supported via restic/rclone, others may
|
|
|
|
require different backends
|
|
|
|
"""
|
|
|
|
from abc import ABC
|
2023-02-08 14:57:34 +00:00
|
|
|
from selfprivacy_api.backup.backuper import AbstractBackuper
|
2023-01-23 13:43:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AbstractBackupProvider(ABC):
|
|
|
|
@property
|
|
|
|
def backuper(self) -> AbstractBackuper:
|
|
|
|
raise NotImplementedError
|
2023-02-01 11:58:55 +00:00
|
|
|
|
2023-05-22 16:01:57 +00:00
|
|
|
def __init__(self, login="", key="", location=""):
|
|
|
|
self.backuper.set_creds(login, key, location)
|
2023-02-01 11:58:55 +00:00
|
|
|
self.login = login
|
|
|
|
self.key = key
|