mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-05 15:57:23 +01:00
merge #396 - allow the backup process to work after a hostname change
This commit is contained in:
@@ -180,8 +180,9 @@ def perform_backup(full_backup):
|
||||
if len(passphrase) < 43: raise Exception("secret_key.txt's first line is too short!")
|
||||
env_with_passphrase = { "PASSPHRASE" : passphrase }
|
||||
|
||||
# Update the backup mirror directory which mirrors the current
|
||||
# STORAGE_ROOT (but excluding the backups themselves!).
|
||||
# Run a backup of STORAGE_ROOT (but excluding the backups themselves!).
|
||||
# --allow-source-mismatch is needed in case the box's hostname is changed
|
||||
# after the first backup. See #396.
|
||||
try:
|
||||
shell('check_call', [
|
||||
"/usr/bin/duplicity",
|
||||
@@ -191,7 +192,8 @@ def perform_backup(full_backup):
|
||||
"--volsize", "250",
|
||||
"--gpg-options", "--cipher-algo=AES256",
|
||||
env["STORAGE_ROOT"],
|
||||
"file://" + backup_dir
|
||||
"file://" + backup_dir,
|
||||
"--allow-source-mismatch"
|
||||
],
|
||||
env_with_passphrase)
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user