From 1e5bd53c3065faf4689d7177a7edd42028b5e20c Mon Sep 17 00:00:00 2001 From: ixof Date: Fri, 9 Dec 2016 01:08:43 -0600 Subject: [PATCH] rsync url patch --- management/backup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/management/backup.py b/management/backup.py index e93b6fcb..9cc8772a 100755 --- a/management/backup.py +++ b/management/backup.py @@ -393,8 +393,11 @@ def list_target_files(config): rsync_fn_size_re = re.compile(r'.* ([^ ]*) [^ ]* [^ ]* (.*)') rsync_target = '{host}:{path}' - _, target_host, target_path = config['target'].split('//') - target_path = '/' + target_path + ## _, target_host, target_path = config['target'].split('//') + target_host = p.netloc + target_path = p.path + if not target_path.startswith('/'): + target_path = '/' + target_path if not target_path.endswith('/'): target_path += '/'