feat: add automated backup system with retention and verification#248
Open
dreamgene wants to merge 1 commit intollinsss:masterfrom
Open
feat: add automated backup system with retention and verification#248dreamgene wants to merge 1 commit intollinsss:masterfrom
dreamgene wants to merge 1 commit intollinsss:masterfrom
Conversation
👷 Deploy request for taggedpay pending review.Visit the deploys page to approve it
|
|
@dreamgene is attempting to deploy a commit to the llinsomoudu-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
llinsss
approved these changes
Mar 24, 2026
llinsss
reviewed
Mar 24, 2026
Owner
llinsss
left a comment
There was a problem hiding this comment.
check and resolve conflicts in
backend/.env.example
backend/DATABASE_SETUP.md
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
llinsss
approved these changes
Mar 30, 2026
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 #127
What was added
backend/scripts/backup.jsnpm run backup:dbbackend/.env.examplebackend/DATABASE_SETUP.mdDatabase backup strategy chosen and why
This backend is configured for PostgreSQL in
backend/knexfile.js, so the backup implementation uses PostgreSQL’s native tooling instead of ORM-level exports.The script uses
pg_dumpwith PostgreSQL custom format (--format=custom) because it is production-suitable, supports reliable verification, and preserves schema and data more safely than application-level JSON exports.Retention policy
7days viaBACKUP_RETENTION_DAYSVerification approach
pg_restore --listagainst the generated dump to verify the archive is readableScheduling approach
This repository does not include an existing PM2, systemd, root Docker scheduler, or GitHub Actions schedule for backend maintenance jobs, so the smallest correct repo-native approach is:
npm run backup:dbbackend/DATABASE_SETUP.mdExample: