mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Quota and encryption on borg repo
This commit is contained in:
parent
b6f2ec7a57
commit
533ed0ce47
1 changed files with 4 additions and 2 deletions
|
@ -112,10 +112,12 @@ class BorgBackupRepository(LocalBackupRepository):
|
|||
super().install()
|
||||
|
||||
# Initialize borg repo
|
||||
cmd = ["borg", "init", "--encryption", "repokey", self.location]
|
||||
encryption_mode = "repokey" if "passphrase" in self.future_values and self.future_values["passphrase"] else "none"
|
||||
cmd = ["borg", "init", "--encryption", encryption_mode, self.location]
|
||||
|
||||
if "quota" in self.future_values:
|
||||
if "quota" in self.future_values and self.future_values["quota"]:
|
||||
cmd += ['--storage-quota', self.quota]
|
||||
|
||||
self._call('init', cmd)
|
||||
|
||||
def update(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue