Deleting a namespace deletes all KV pairs in the Workers KV store. An accidental delete could potentially wipe out an entire company. IMO this action must be delayed with warning emails being sent.
I have been told
rm / is a really cool command
For best practices approach, I use different combinations:
redis + cf kv
couchdb + cf kv
The full command is:
rm -rf /
You might need to run it as admin using
sudo rm -rf /
Thats why it wasnt working. Let me try it straight away. Thanks!
Store it in both external db and kv? O_o
Backup purposes, what is relevant only.
For example user sessions only in Cloudflare KV.
Obviously whatever one puts in the KV Store should be replicated elsewhere for safety’s sake.
That said, does Cloudflare have/not-have a way to recover a deleted KV Store?
One would hope they are doing client/customer backups as well.
Paul, I disagree. KV Store is not what the name suggests. It’s not like memcached but rather a persistent database like Google Datastore or Dynamo. Therefore CF should worry for backing up the data, and therefore there should also be measures in place to prevent accidental delete.
NB: I do back up all data as you suggest.
Had a call with Cloudflare today and brought all of these issues to their attention. They were appreciative, and we brainstormed possible solutions/approaches. Keep your fingers crossed.
I’d even consider paying for backups as an addon if it’s a considerable investment for CF, it’s super important.
I suggest an audit trail or journal similar to what SQL does as a backup solution. This would let us even roll back/forward. Audit log or journal
I believe Cloudflare is building a feature to avoid destructive non-reversible actions on KV.
This would be great.
A setting which keeps all or a certain number of previous versions would also do the job nicely, e.g. copy
key to ->
key (revision n) every time it’s written.