Restoring from backup on Deno Deploy
When something goes bad to the data on Deno Deploy, i want to be able to quickly restore it from a backup. Is there currently an easy way to do that?
Let's say i have a backup stored in S3 and i need to apply it back on Deno Deploy. This doc (https://docs.deno.com/deploy/kv/manual/backup/#using-backups) says:
S3 backups can be used with the denokv toolThe mentioned "denokv tool" is a self-hosted backend for Deno KV. So does it mean i need to host a separate Deno KV database which uses the backup from S3? And then update my Deno Deployed app to point to this new DB instead of default DB on Deno Deploy? If that's correct, then it means i shouldn't really use default DB of Deno Deploy, but instead host DB on my own. And if that's true, then the DB on Deno Deploy isn't very useful, cause i have to still host my own DB anyway. The easiest approach i found so far is to simply use kview and manually click
export
to get an NDJSON file. Then i can click import
and use that NDJSON. simple as that.
To automate this process i can use kvtoolbox (the same thing that's used within kview) and run it with CRON.
but this feels weird, i wonder how others are doing backups and restores. Asked also on #deploy™ (here) but no answers as of yet.
Thanks for any hints!7 Replies
found 2 issues on
deploy_feedback
repo, with similar questions but lacking ideas for restore approaches:
https://github.com/denoland/deploy_feedback/issues/651
https://github.com/denoland/deploy_feedback/issues/407
Anyone has any tips on how to approach the snapshot restore? or backups in general of Deno KV?GitHub
KV backup restore · Issue #651 · denoland/deploy_feedback
What problem are you trying to solve? I love Deno deploy and Deno KV. I can see myself using it as a primary database for many usecases. However, although I can set up backups to an S3 bucket, it d...
GitHub
[KV Feedback]: What is the backup policy or our backup & snapshotti...
🔍 Did you search for existing issues? Connected to CSV download enhancement request: #370 Type of feedback Feature request Description Will you provide KV store backup and snapshotting in Deploy? I...
I wold like to know too
I love deno but sometimes I think they are doing many things at once and start dropping plates. It seems like you need to run your own datastore to restore. Their docs need work. Hopefully they hire people to make it better
Yes! That's what I think too
hey all! My OP is from nov 25th and the mentioned GH issues are from earlier. No response during this time, and i'm thinking it's due to (weirdly) low priority of the issue. Probably just not a lot of people need this.
maybe it would help to share it with more people, upvote this thread or smthng? I don't want to be spamming about the same thing too much 🙊
My thoughts are it's not really a "backup" but a replica set that you can point in time reference in case something goes wrong and you can manually edit your kv. I think calling it a "backup" is kinda disingenuous
Yup, i'm with you. In some contexts this is called "snapshot"
Hey again, maybe now that the holidays are over we could get some insight into this topic from the team?
@Marc pardon to put you on the spot, doing so cause we had a brief DM exchange. Maybe you would be able to point this to someone who has a moment to look into this? thanks!