From b66f12dd4cd1e603a004c90f4380e896cd96f607 Mon Sep 17 00:00:00 2001 From: yodax Date: Mon, 10 Apr 2017 10:33:11 +0200 Subject: [PATCH] Fix rsync backup. The path was not append properly --- management/backup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/management/backup.py b/management/backup.py index 2021ddee..7c7f5d93 100755 --- a/management/backup.py +++ b/management/backup.py @@ -399,10 +399,11 @@ def list_target_files(config): rsync_fn_size_re = re.compile(r'.* ([^ ]*) [^ ]* [^ ]* (.*)') rsync_target = '{host}:{path}' - if not target.path.endswith('/'): - target_path = target.path + '/' - if target.path.startswith('/'): - target_path = target.path[1:] + target_path = target.path + if not target_path.endswith('/'): + target_path = target_path + '/' + if target_path.startswith('/'): + target_path = target_path[1:] rsync_command = [ 'rsync', '-e',