redis: backup before upgrade

This commit is contained in:
Girish Ramakrishnan
2021-03-24 19:23:23 -07:00
parent 7ae79fe3a5
commit d277f8137b

View File

@@ -1872,6 +1872,10 @@ function startRedis(existingInfra, callback) {
const redisName = 'redis-' + app.id;
async.series([
(done) => {
if (!upgrading) return done();
backupRedis(app, {}, done);
},
shell.exec.bind(null, 'stopRedis', `docker stop ${redisName} || true`), // redis will backup as part of signal handling
shell.exec.bind(null, 'removeRedis', `docker rm -f ${redisName} || true`),
setupRedis.bind(null, app, app.manifest.addons.redis) // starts the container