From fca3f606d25b9f1f6b4c874c6f970edb8a307948 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 27 May 2020 21:01:17 -0700 Subject: [PATCH] Do not backup stopped apps --- CHANGES | 2 ++ src/backups.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index 37b49e778..0ddcf2bca 100644 --- a/CHANGES +++ b/CHANGES @@ -1954,6 +1954,8 @@ [5.2.4] * mail: enable/disable incoming mail was showing an error +* Do not trigger backup of stopped apps. Instead, we will just retain it's existing backups + based on retention policy [6.0.0] * better nginx config for higher loads diff --git a/src/backups.js b/src/backups.js index 9718f5941..f71f04d0f 100644 --- a/src/backups.js +++ b/src/backups.js @@ -1027,6 +1027,10 @@ function backupBoxWithAppBackupIds(appBackupIds, tag, progressCallback, callback function canBackupApp(app) { // only backup apps that are installed or specific pending states + + // stopped apps cannot be backed up because addons might be down (redis) + if (app.runState === apps.RSTATE_STOPPED) return false; + // we used to check the health here but that doesn't work for stopped apps. it's better to just fail // and inform the user if the backup fails and the app addons have not been setup yet. return app.installationState === apps.ISTATE_INSTALLED ||