summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/Main.py16
2 files changed, 18 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index f2ac288..22fca75 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,9 @@
New in v1.2.3 (????/??/??)
---------------------------
+Print a more helpful error message if we cannot write to the backup
+destination. (Andrew Ferguson)
+
Add ETIMEDOUT to the list of recoverable errors; when irrecoverable, a
ConnectionError is raised. Closes Ubuntu bug #304659. (Andrew Ferguson)
diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py
index 9ba0dce..f522a1d 100644
--- a/rdiff-backup/rdiff_backup/Main.py
+++ b/rdiff-backup/rdiff_backup/Main.py
@@ -441,7 +441,21 @@ option.""" % rpout.path)
elif check_failed_initial_backup():
fix_failed_initial_backup()
- if not Globals.rbdir.lstat(): Globals.rbdir.mkdir()
+ if not Globals.rbdir.lstat():
+ try:
+ Globals.rbdir.mkdir()
+ except IOError, exc:
+ Log.FatalError(
+"""Could not create rdiff-backup directory
+
+%s
+
+due to
+
+%s
+
+Please check that the rdiff-backup user can create files and directories in the
+destination directory: %s""" % (Globals.rbdir.path, exc, rpout.path))
SetConnections.UpdateGlobal('rbdir', Globals.rbdir)
def backup_warn_if_infinite_regress(rpin, rpout):