Delete namespace is a very dangerous action

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.

2 Likes

I have been told rm / is a really cool command :wink:

2 Likes

For best practices approach, I use different combinations:
redis + cf kv
couchdb + cf kv

1 Like

The full command is: rm -rf /

You might need to run it as admin using sudo as: sudo rm -rf /

4 Likes

Thats why it wasnt working. Let me try it straight away. Thanks!

5 Likes

Store it in both external db and kv? O_o

1 Like

Backup purposes, what is relevant only.
For example user sessions only in Cloudflare KV.

2 Likes

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.

Thx

1 Like

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. :slight_smile:

3 Likes

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. :slight_smile:

2 Likes

I’d even consider paying for backups as an addon if it’s a considerable investment for CF, it’s super important.

2 Likes

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.

1 Like

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.