Skip to content

DB backup #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 2, 2025
Merged

DB backup #216

merged 7 commits into from
Feb 2, 2025

Conversation

umputun
Copy link
Owner

@umputun umputun commented Jan 8, 2025

Add a new option to create a database backup file on version changes. This is handy for extreme cases where a bug is introduced, or user have another reason to downgrade. However, some schema migrations may not be backward compatible, and with an automatic copy of the database file in case the revision changes, it will allow path to recover the database to that point and continue working with the previous version.

File naming is tg-spam.db.<revision>, i.e., tg-spam.db.master-77e0bfd-20250107T23:17:34. The file name is a bit confusing because it means "backup prior to the version," but for now, this is the best I can think of.

Copy link

cloudflare-workers-and-pages bot commented Jan 8, 2025

Deploying tg-spam with  Cloudflare Pages  Cloudflare Pages

Latest commit: 24ac955
Status: ✅  Deploy successful!
Preview URL: https://94210dda.tg-spam.pages.dev
Branch Preview URL: https://db-backup.tg-spam.pages.dev

View logs

handle dots in version, replace by _

make tests for backupDB independent

fix mix test for backup

wip

.
@umputun umputun merged commit 16843e3 into master Feb 2, 2025
5 checks passed
@umputun umputun deleted the db-backup branch February 2, 2025 08:06
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