Skip to content
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

It'd be nice to save db backups occasionally #213

Open
netcreateorg opened this issue Feb 22, 2022 · 7 comments
Open

It'd be nice to save db backups occasionally #213

netcreateorg opened this issue Feb 22, 2022 · 7 comments
Assignees
Projects

Comments

@netcreateorg
Copy link
Collaborator

Right now, we have occasional bugs that lead to corrupted data, and it is really hard to recover. Ideally, we'd have backups that we can go back to.

One option is to save every major change to a new DB, but presumably that'll get really big.

Can we check internally somehow if the data is good and then delete if it is? A record of old databases would be nice, but it's only really crucial because of the corruption / crash and we can't always predict those yet.

Flagging for @kalanicraig to weigh in

@benloh
Copy link
Collaborator

benloh commented Feb 28, 2022

From email:
I think it should be relatively easy to implement. The question really is when you want the backup to be made. We can do it periodically, e.g. every minute, or on every save, which might be quite often (I can't remember off the top of my head, but we might be doing saves every second). I think the big worry would be how much space it can eat up over time, especially on DO instances. Granted, the files tend to be relatively small, but they can add up, especially if you're on a small drive.

@benloh
Copy link
Collaborator

benloh commented Feb 28, 2022

@jdanish Can you please attach an example corrupted db file? (The "VF0i1.loki" file you had emailed to me was a weird binary with only 157 bytes...but maybe that's the resulting corrupted file? NOTE you'll probably need to zip it).

@netcreateorg
Copy link
Collaborator Author

VFOI1.loki.zip

@netcreateorg
Copy link
Collaborator Author

I'm thinking every update but will defer to Kalani.

@benloh benloh added this to To Do in Version 1.4 via automation Mar 1, 2022
@benloh benloh moved this from To Do to In Progress in Version 1.4 Mar 14, 2022
@benloh
Copy link
Collaborator

benloh commented Mar 14, 2022

One additional idea: We can save off backups to a backup folder to keep the runtime folder more pristine.

@benloh
Copy link
Collaborator

benloh commented Mar 25, 2022

This is partially implemented: A backup is made whenever an import is completed.
The functionality for creating backups is there. The keys is figuring a mechanism for triggering that -- automatic? or manual?

Save this for the next round.

@benloh benloh moved this from In Progress to To Do in Version 1.4 Mar 25, 2022
@netcreateorg
Copy link
Collaborator Author

netcreateorg commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant