feat: database backup/restore automation and read replica routing (#8… - #889
Merged
Smartdevs17 merged 1 commit intoSep 23, 2026
Conversation
…artdevs17#880, Smartdevs17#881) Smartdevs17#880 — Database backup and restore automation - Add BackupAutomationService with full/incremental pg_dump, SHA-256 checksum verification, S3 upload (AWS SDK + local-copy fallback), dry-run restore, PITR lookup, and retention cleanup - Add three scheduled tasks: daily full backup (02:00 UTC), 6-hour incremental backup, weekly retention cleanup - Extend backup router with new endpoints: POST /backup/trigger, GET /backup/restore-points, GET /backup/restore-points/:id, POST /backup/restore/:id, POST /backup/restore/:id/dry-run, GET /backup/pitr, GET /backup/pitr/at, GET /backup/records - Update .env.example with all BACKUP_* and S3_* env vars - Add BackupAutomationService unit tests (dryRunMode, full/incremental, restore, dry-run restore, PITR, retention, job handlers) Smartdevs17#881 — Read replica routing - Extend ReadReplicaRouter with background health checks, lag-aware failover cooldown, session stickiness, disableReplica/enableReplica - Add PrismaReplicaClient: transparent Proxy routes Prisma read ops (findUnique, findFirst, findMany, count, aggregate, groupBy) to healthy replicas with automatic primary fallback on error - Add monitoring endpoints: GET /database/replicas, POST /database/replicas/:url/disable, POST /database/replicas/:url/enable - Mount databaseRouter in index.ts; start/stop health checks on server lifecycle - Add 51 tests (all passing), pre-existing 4-test suite unaffected
|
@Benalex8797 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Benalex8797 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #880
closes #881
closes #882
closes #883
#880 — Database backup and restore automation
#881 — Read replica routing
What this PR does
Changes
Why
How to test