fix(backups): suppress output during backup and restore processes

- Updated the backup command in runWebServerBackup to suppress output by redirecting it to /dev/null.
- Modified the restore command in restoreWebServerBackup to also suppress output during the extraction of backups.
This commit is contained in:
Mauricio Siu 2025-04-06 03:22:03 -06:00
parent b2a8572d10
commit bea0316bbd
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ export const runWebServerBackup = async (backup: BackupSchedule) => {
await execAsync(`cp -r ${BASE_PATH}/* ${tempDir}/filesystem/`); await execAsync(`cp -r ${BASE_PATH}/* ${tempDir}/filesystem/`);
await execAsync( await execAsync(
`cd ${tempDir} && zip -r ${backupFileName} database.sql filesystem/`, `cd ${tempDir} && zip -r ${backupFileName} database.sql filesystem/ > /dev/null 2>&1`,
); );
const uploadCommand = `rclone copyto ${rcloneFlags.join(" ")} "${tempDir}/${backupFileName}" "${s3Path}"`; const uploadCommand = `rclone copyto ${rcloneFlags.join(" ")} "${tempDir}/${backupFileName}" "${s3Path}"`;

View File

@ -45,7 +45,7 @@ export const restoreWebServerBackup = async (
// Extract backup // Extract backup
emit("Extracting backup..."); emit("Extracting backup...");
await execAsync(`cd ${tempDir} && unzip ${backupFile}`); await execAsync(`cd ${tempDir} && unzip ${backupFile} > /dev/null 2>&1`);
// Restore filesystem first // Restore filesystem first
emit("Restoring filesystem..."); emit("Restoring filesystem...");