flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Backend] Automated Database Backup & Disaster Recovery Verification Pipeline

Open blurbeast opened this issue 3 months ago • 8 comments

Overview & Background

FlowFi stores indexed stream states, event histories, and user webhook configurations. To prevent data loss and ensure rapid disaster recovery, an automated encrypted backup pipeline with periodic restoration verification in CI is required.


Technical Specification & Architecture

  1. Backup Script (scripts/db-backup.sh):
    • Perform atomic pg_dump with gzip compression.
    • Encrypt backup archive using AES-256-GCM.
    • Upload backup artifact to S3 / Cloud Storage with 30-day retention policy.
  2. Disaster Recovery Validation Job (.github/workflows/dr-test.yml):
    • Scheduled weekly CI workflow that spins up a clean Postgres container.
    • Downloads the latest encrypted backup, decrypts, and restores it.
    • Runs Prisma schema verification and row count integrity assertions.

Target Files

  • scripts/db-backup.sh
  • scripts/db-restore.sh
  • .github/workflows/dr-test.yml

Acceptance Criteria

  • [ ] Encrypted automated backup script with cloud storage destination.
  • [ ] Weekly disaster recovery CI workflow restores backup and validates DB integrity.
  • [ ] Documentation added for disaster recovery procedures.

blurbeast avatar Aug 29 '26 22:08 blurbeast

I would like to work on this Issue

obswrld avatar Aug 30 '26 03:08 obswrld

Hi! I'd like to claim this issue. Just finished BR-09 on zicket-backend (PR #181, merged) — comfortable building the encrypted backup script (pg_dump + AES-256-GCM + S3 upload), the restore script, and the weekly DR validation CI workflow with integrity checks. I can have this done in under 2 days.

Iker2522 avatar Aug 30 '26 04:08 Iker2522

Hello! I'd like to work on this issue.

I can tackle [Backend] Automated Database Backup & Disaster Recovery Verification Pipeline. Proposed implementation roadmap:

  • [ ] Analysis: Inspect current behavior and edge cases in LabsCrypt/flowfi
  • [ ] Implementation: Structure backend handlers for [Backend] Automated Database Backup & Disaster Recovery Verification Pipeline with strict input validation, proper HTTP error codes, and idempotent execution.
  • [ ] Testing: Cover implementation with end-to-end integration tests for standard and edge-case inputs.
  • [ ] PR: Atomic commit with clean git hygiene and passing CI

Ready to deliver a clean, tested PR within 12–24 hours. Please assign!

ranjeet150 avatar Sep 12 '26 23:09 ranjeet150

@Vivianndev has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

Hi, I'd genuinely love to resolve this issue. Plss assign to me thanks

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Vivianndev to this issue.

Vivianndev avatar Sep 27 '26 15:09 Vivianndev

@Marvellous805 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

Hi maintainer I can fix this issue and submit quality PR

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Marvellous805 to this issue.

Marvellous805 avatar Sep 27 '26 15:09 Marvellous805

Congratulations, @Marvellous805! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

🧑‍💻 @Marvellous805: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Sep 27 '26 15:09 drips-wave[bot]

🎉 This issue has been marked as completed on GrantFox!

@Marvellous805's PR #1531 was approved and merged by @K1NGD4VID.

🏆 @Marvellous805: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (210 total points). Track your full progress on GrantFox.

👏 Great work, @Marvellous805! Keep contributing to LabsCrypt.

grantfox-oss[bot] avatar Oct 08 '26 06:10 grantfox-oss[bot]

This issue has been marked as completed by a Drips Wave moderator for @Marvellous805 as part of the Stellar Wave Program's 9th Wave 🥳

Moderator's reason: [Auto-assessed] The PR was merged by @K1NGD4VID on 2026-10-08 (PR #1531), perfectly fulfilling the requirements of issue #1326 by implementing automated encrypted database backups, a disaster recovery restoration verification workflow, and corresponding documentation.

😎 @Marvellous805: You earned 150 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

ℹ️ Note: This issue was marked complete via moderation. Points were issued even though the GitHub issue remains open.

drips-wave[bot] avatar Oct 13 '26 00:10 drips-wave[bot]