1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-26 02:57:04 +00:00

merge #396 - allow the backup process to work after a hostname change

This commit is contained in:
Joshua Tauberer 2015-05-30 13:55:08 +00:00
commit 2b341d884f
2 changed files with 6 additions and 3 deletions

View File

@ -10,6 +10,7 @@ In Development
* Fix broken install on OVH VPS's. * Fix broken install on OVH VPS's.
* After installing an SSL certificate from the control panel, the page wasn't being refreshed. * After installing an SSL certificate from the control panel, the page wasn't being refreshed.
* The minimum greylisting delay has been reduced from 5 minutes to 3 minutes. * The minimum greylisting delay has been reduced from 5 minutes to 3 minutes.
* Backups broke if the box's hostname was changed after installation.
v0.09 (May 8, 2015) v0.09 (May 8, 2015)
------------------- -------------------

View File

@ -180,8 +180,9 @@ def perform_backup(full_backup):
if len(passphrase) < 43: raise Exception("secret_key.txt's first line is too short!") if len(passphrase) < 43: raise Exception("secret_key.txt's first line is too short!")
env_with_passphrase = { "PASSPHRASE" : passphrase } env_with_passphrase = { "PASSPHRASE" : passphrase }
# Update the backup mirror directory which mirrors the current # Run a backup of STORAGE_ROOT (but excluding the backups themselves!).
# 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: try:
shell('check_call', [ shell('check_call', [
"/usr/bin/duplicity", "/usr/bin/duplicity",
@ -191,7 +192,8 @@ def perform_backup(full_backup):
"--volsize", "250", "--volsize", "250",
"--gpg-options", "--cipher-algo=AES256", "--gpg-options", "--cipher-algo=AES256",
env["STORAGE_ROOT"], env["STORAGE_ROOT"],
"file://" + backup_dir "file://" + backup_dir,
"--allow-source-mismatch"
], ],
env_with_passphrase) env_with_passphrase)
finally: finally: