Skip to content

fix: consistent and private live node backups - #565

Merged
St4NNi merged 4 commits into
mainfrom
fix/live-backup-safety
Nov 4, 2026
Merged

St4NNi merged 4 commits into
mainfrom
fix/live-backup-safety

Conversation

@St4NNi

@St4NNi St4NNi commented Nov 3, 2026

Copy link
Copy Markdown
Member

Description

Follow-up to the live backup commands. A backup now reads the node, document sync and metadata databases at one instant. Backup files are readable by their owner only. A restore never leaves a half-built directory behind, and the doctor builds again on platforms without Unix sockets. Blob contents stay outside the backup. A restored node therefore checks every bucket and lists versions whose blob is missing.

Changes

  • Open the three database snapshots back to back and confirm with Fjall sequence numbers that no database wrote in between; retry otherwise, and fail with a clear error if the node never pauses writing
  • Create backup files with mode 0600 from the start, so the node's secret key in the backup is not readable by other users
  • Restore into <target>.partial and rename it into place only after the whole file passed its checks; a failed restore removes the partial directory
  • Queue a storage check of every bucket in the restored node database, so GET /data/buckets/{bucket}/storage/check lists versions whose blob is missing
  • State in the command help and restore output that blob contents (BLOB_ROOT and other storage backends) are not part of a backup
  • Gate only the Unix socket parts of the backup code, so aruna and aruna-doctor build on Windows; there aruna-doctor backup reports that live backups are unsupported, and restore works
  • Bump the workspace to 3.0.0-alpha.148

Relates to #556

@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.38%. Comparing base (69588b6) to head (b646f51).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
storage/src/snapshot.rs 92.50% 3 Missing ⚠️
aruna-doctor/src/backup.rs 98.52% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #565      +/-   ##
==========================================
- Coverage   89.39%   89.38%   -0.02%     
==========================================
  Files        1487     1490       +3     
  Lines      618020   618557     +537     
==========================================
+ Hits       552487   552900     +413     
- Misses      65533    65657     +124     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@St4NNi
St4NNi force-pushed the fix/live-backup-safety branch from b646f51 to 90b7e88 Compare November 4, 2026 06:32
@St4NNi
St4NNi merged commit 08dcd0c into main Nov 4, 2026
29 checks passed
@St4NNi
St4NNi deleted the fix/live-backup-safety branch November 4, 2026 07:26

This branch was previously deployed

1 inactive deployment
coverage — 90b7e88c Deployed Nov 4, 2026 by St4NNi via Generate Coverage Report #1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant