mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
backup: Fix bug in adding existing unencryped backup location
borg throws and warning "Warning: Attempting to access a previously unknown unencryped repository!\nDo you want to continue?" and then fails while asking for a manual confirmation. Avoid this by telling borg not to prompt (and confirm yes). This commit provides a fix for the issue described here: https://discuss.freedombox.org/t/how-do-i-restore-freedombox/2022/10 [sunil: Drop the part about handling the error message] Signed-off-by: Benedek Nagy <contact@nbenedek.me> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
9cfd8a2e55
commit
8bafabe2f9
@ -339,6 +339,7 @@ def load_settings(app_id: str) -> dict[str, int | float | bool | str]:
|
||||
def _get_env(encryption_passphrase: str | None = None):
|
||||
"""Create encryption and ssh kwargs out of given arguments."""
|
||||
env = dict(os.environ, BORG_RELOCATED_REPO_ACCESS_IS_OK='yes',
|
||||
BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK='yes',
|
||||
LANG='C.UTF-8')
|
||||
# Always provide BORG_PASSPHRASE (also if empty) so borg does not get stuck
|
||||
# while asking for a passphrase.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user