Download KV record in bulk
Any way to download kv store record in bulk? I mean save as a local file.
2 Replies
There’s no automatic way that I know of, no. You would need to iterate over and read every key in your KV namespace.
My workaround:
Add a fetch handler which will list all kv records and return as a
application/json
response.
@James Is there a way to have fetch handler only on local development? Something like:
I want to have a helper function which can interact with KV/R2 only on local development, so I don't have to comment out the fetch
handler before I deploy to prod.