refactor(backups): add repo init

This commit is contained in:
Houkime 2023-02-17 15:59:27 +00:00
parent cbf917ad8a
commit d1dbcbae5e

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