From 0df373916228ec5bc7d9943163d541bba8046417 Mon Sep 17 00:00:00 2001 From: owsla Date: Thu, 18 Dec 2008 21:49:02 +0000 Subject: Print a more helpful error message if we cannot write to the backup destination. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@971 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 +++ rdiff-backup/rdiff_backup/Main.py | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) 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): -- cgit v1.2.1