Changing Shelly devices without losing previous data

Hi,
I would like to switch from a Shelly 3EM to a 3EM Pro and also exchange a 1PM, which is collecting my Solar data. Now, I don’t want to lose my previous data of the last 2 years, but I am using a docker HA instance and could not figure out how to migrate the db data from one entity to another with this setup. What is the best way of doing this, any advice?