Commit Graph
3 Commits
Author SHA1 Message Date
Andras Bacsai 1a2a5362ad fix(security): secure remote command secrets and clone volume data 2026-10-27 09:47:18 +01:00
Andras BacsaiandClaude Opus 5.5 1c68eafa84 fix(backups): make overlapping and concurrent backup runs safe
- Skip the occurrence of a backup whose previous run still holds the
  overlap lock, so stale recovery does not run it later; do not rerun a
  lost occurrence when a newer one already completed.
- Skip a database backup while a start, restart, or import of the database
  is in progress, and record the skip in the execution list.
- Give every backup file a unique name per run and keep the service
  database backup folder of earlier releases.
- Record missed scheduled tasks and Docker cleanups as failed executions
  and notify the team.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:01:20 +02:00
Andras Bacsai 033f78d907 fix(backup): fail compressed dumps when the dump command fails
A plain pipe into the compressor only reported the compressor's exit
status, so a failed dump still produced a small, valid archive. Add
pipeToFileKeepingExitStatus() to propagate the source's exit status in
POSIX sh and use it for all compressed dump commands.

- Delete the partial local backup file on any failed backup, not only
  for ClickHouse, since untracked files are never removed by retention
- Wait up to 10s for locks when running VACUUM INTO for SQLite backups
- Refuse SQLite restores unless the file has a SQLite header, so an
  empty backup no longer wipes the database
- Add tests for dump exit status handling and SQLite restore validation
2026-09-29 23:23:02 +02:00