mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 21:41:27 +00:00
refactor(backups): add repo init
This commit is contained in:
parent
5371c7feef
commit
a405eddbcf
|
@ -81,6 +81,17 @@ class ResticBackuper(AbstractBackuper):
|
|||
# stderr=subprocess.STDOUT,
|
||||
# )
|
||||
|
||||
def init(self, repo_name):
|
||||
init_command = self.restic_command(
|
||||
repo_name,
|
||||
"init",
|
||||
)
|
||||
subprocess.Popen(
|
||||
init_command,
|
||||
shell=False,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
|
||||
def restore_from_backup(self, repo_name, snapshot_id, folder):
|
||||
"""
|
||||
Restore from backup with restic
|
||||
|
|
Loading…
Reference in a new issue