When you change templates you run the risk of loosing any custom blocks that were in regions that are no longer available on the new template.

Is there a way to recover these blocks in the database or the config?

UPDATE: This is known bug - https://github.com/backdrop/backdrop-issues/issues/3762 there is a PR, but it needs a code review.

Accepted answer

The blocks I lost were from the home page. I checked the active config directory, since I had not versioned my config lately. I found the layout.layout.home json file and noticed that the blocks I was looking for were still listed (despite not being visible on the home page). 

In the list, was a node ID for the content I was looking for. It turns out it was in node 80. So I entered node/80/edit into the brower and an edit window popped up with my content. 

I don't think I could have found this without the NID that happened to still be available in the JSON config file. I wonder if it would have stayed there forever?

Comments

The blocks I lost were from the home page. I checked the active config directory, since I had not versioned my config lately. I found the layout.layout.home json file and noticed that the blocks I was looking for were still listed (despite not being visible on the home page). 

In the list, was a node ID for the content I was looking for. It turns out it was in node 80. So I entered node/80/edit into the brower and an edit window popped up with my content. 

I don't think I could have found this without the NID that happened to still be available in the JSON config file. I wonder if it would have stayed there forever?