From 9ddcfc318ab4e87e555feddd08d16fcf4beffb3f Mon Sep 17 00:00:00 2001 From: Pierre-Gilles Leymarie Date: Tue, 6 Aug 2024 20:54:30 +0200 Subject: [PATCH] Fix old strategy restore --- server/lib/gateway/gateway.downloadBackup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/gateway/gateway.downloadBackup.js b/server/lib/gateway/gateway.downloadBackup.js index 9a8257c0e3..99b2cb0f74 100644 --- a/server/lib/gateway/gateway.downloadBackup.js +++ b/server/lib/gateway/gateway.downloadBackup.js @@ -62,8 +62,8 @@ async function downloadBackup(fileUrl) { } catch (e) { logger.info(`Extracting failed using new strategy (Error: ${e})`); logger.info(`Restoring using old backup strategy (SQLite only)`); - await exec(`gzip -d ${compressedBackupFilePath}`); sqliteBackupFilePath = path.join(restoreFolderPath, `${encryptedBackupName}.db`); + await exec(`gzip -dc ${compressedBackupFilePath} > ${sqliteBackupFilePath}`); } // done! logger.info(`Gladys backup downloaded with success.`);