From bb1237f9ade28eff9a39120925f45311d06e3c80 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 4 Oct 2023 18:48:06 +0200 Subject: [PATCH] fix secret name --- backupbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backupbot.py b/backupbot.py index 47f48b4..2675cd6 100755 --- a/backupbot.py +++ b/backupbot.py @@ -251,7 +251,8 @@ def download(snapshot, path, volumes, secrets): path = f[ 'path' ] if SERVICE in path and f['type'] == 'file': secret = dump(snapshot, path).decode() - secrets[path.removeprefix(SERVICE)] = secret + secret_name = path.removeprefix(f'{SECRET_PATH}{SERVICE}_') + secrets[secret_name] = secret with open(filename, "w") as file: json.dump(secrets, file) print(filename)