refactor(backups): add repo init

restic-rewrite-api
Houkime 2023-02-17 15:59:27 +00:00
parent c9fd656181
commit 86e2b90bef
1 changed files with 11 additions and 0 deletions

View File

@ -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