There is no built in method now to duplicate the storage of a DO to a different one. You need to do

There is no built in method now to duplicate the storage of a DO to a different one. You need to do the copy of the data in your code. Reading rows/KV items and writing them in the new one.

In my opinion though, if users are meant to be able to change their emails in your application, then those emails are not a good key to use for your DOs. The DO keys should be immutable identifiers for the data hosted in that DO. Otherwise it will become very expensive and slow to duplicate DOs all the time, and unless you block access to them while that's done you will also have consistency issues.
Was this page helpful?