From 202e49a897ede0a51beed15adac3db01a385ccdb Mon Sep 17 00:00:00 2001 From: Xoib Date: Wed, 13 May 2015 13:52:23 +0200 Subject: [PATCH 1/2] allow the backup process to work after a hostname change --- management/backup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/management/backup.py b/management/backup.py index e0349dd6..6b25ea74 100755 --- a/management/backup.py +++ b/management/backup.py @@ -191,7 +191,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: From 141a09b31e4b34e5049db4b4d474fedacb2e1941 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 30 May 2015 13:46:39 +0000 Subject: [PATCH 2/2] changelog, comments for duplicity --allow-source-mismatch --- CHANGELOG.md | 2 +- management/backup.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65a5a0dd..e1d5c5c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ In Development -------------- * ownCloud updated to version 8.0.3. - +* Backups broke if the box's hostname was changed after installation. v0.09 (May 8, 2015) ------------------- diff --git a/management/backup.py b/management/backup.py index 6b25ea74..16391263 100755 --- a/management/backup.py +++ b/management/backup.py @@ -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",