From 7817111928ed65b356bdfd41e5293c756c272682 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Mon, 17 Sep 2018 19:17:19 -0400 Subject: [PATCH] backups: Create folder if needed during setup Signed-off-by: James Valleroy Reviewed-by: Joseph Nuthalapati --- actions/backups | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/actions/backups b/actions/backups index 40abc7546..96c0c91d4 100755 --- a/actions/backups +++ b/actions/backups @@ -83,6 +83,10 @@ def subcommand_setup(_): try: subprocess.run(['borg', 'info', REPOSITORY], check=True) except: + path = os.path.dirname(REPOSITORY) + if not os.path.exists(path): + os.makedirs(path) + subprocess.run(['borg', 'init', '--encryption', 'none', REPOSITORY])