From 3a50b74db81f6618cc63c8a522c40fb4cea82bae Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 21 Sep 2021 14:36:30 +0100 Subject: [PATCH] only write to backups bucket in self host --- packages/server/src/utilities/fileSystem/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index b83ff03854..42e61e5824 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -130,11 +130,13 @@ exports.performBackup = async (appId, backupName) => { ), }) // write the file to the object store - await streamUpload( - ObjectStoreBuckets.BACKUPS, - join(appId, backupName), - fs.createReadStream(path) - ) + if (env.SELF_HOSTED) { + await streamUpload( + ObjectStoreBuckets.BACKUPS, + join(appId, backupName), + fs.createReadStream(path) + ) + } return fs.createReadStream(path) }