kliuksas
kliuksas3w ago

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 tool
The 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!
2 Replies
kliuksas
kliuksasOP3w ago
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...
patrickalima98
I wold like to know too