From 2db5d4d135828bd189d085409ff6e593b9e1312a Mon Sep 17 00:00:00 2001 From: Wim Pomp Date: Fri, 12 Feb 2021 10:21:08 +0100 Subject: [PATCH] - do not make path when dry-run --- backup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backup.py b/backup.py index b2829f4..de48800 100755 --- a/backup.py +++ b/backup.py @@ -70,7 +70,8 @@ if __name__ == '__main__': else: latest = '' - os.makedirs(os.path.join(backup_path_full, args.source[1:])) + if run: + os.makedirs(os.path.join(backup_path_full, args.source[1:])) rsync = 'rsync {} --delete "{}" {} "{}"'.format(args.rsync, os.path.join(args.source, ''), latest, os.path.join(backup_path_full, args.source[1:]))