From 52236b61892ac7568e1c4c32f5c23a44c8a27c75 Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Fri, 21 Jul 2023 11:28:34 +1000 Subject: [PATCH] fix: add the project directory to restore bucket path --- node-packages/commons/src/tasks.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node-packages/commons/src/tasks.ts b/node-packages/commons/src/tasks.ts index eb913393e7..3ad4d630f2 100644 --- a/node-packages/commons/src/tasks.ts +++ b/node-packages/commons/src/tasks.ts @@ -1196,7 +1196,10 @@ export const createMiscTask = async function(taskData: any) { // Parse out the baasBucketName for any migrated projects // check if the project is configured for a shared baas bucket let [baasBucketName, shared] = await getBaasBucketName(result.environment.project, result.environment.openshift) - + if (shared) { + // if it is a shared bucket, add the repo key to it too for restores + baasBucketName = `${baasBucketName}/baas-${makeSafe(taskData.data.project.name)}` + } // Handle custom backup configurations let lagoonBaasCustomBackupEndpoint = result.environment.project.envVariables.find(obj => { return obj.name === "LAGOON_BAAS_CUSTOM_BACKUP_ENDPOINT"