diff --git a/packages/server/src/api/controllers/deploy/index.ts b/packages/server/src/api/controllers/deploy/index.ts index b3b875e397..f1700aef87 100644 --- a/packages/server/src/api/controllers/deploy/index.ts +++ b/packages/server/src/api/controllers/deploy/index.ts @@ -110,14 +110,17 @@ async function deployApp(deployment: any, userId: string) { // can't do this in test if (!env.isTest()) { - // trigger backup initially - await backups.triggerAppBackup( - productionAppId, - AppBackupTrigger.PUBLISH, - { - createdBy: userId, - } - ) + // don't try this if feature isn't allowed, will error + if (!(await backups.isEnabled())) { + // trigger backup initially + await backups.triggerAppBackup( + productionAppId, + AppBackupTrigger.PUBLISH, + { + createdBy: userId, + } + ) + } } const config: any = {