Error Restoring Backup on Migration

Exactly same problem here.

But with some variation.

I was trying to create a test machine to test some plugins and themes.

I created a new discourse forum from scratch, update to the last version, and then tried to restore the last backup.

It failed with that error.

I realized that the test machine had a newest version than the production machine.

I upgrade the production machine and made a backup.

Same error.

The test machine were I tried to restore has v2.4.0beta4+115.
The production machine reports latest-release+115 after upgrading (strange as till now it reported the version number).
discourse-doctor script reports v2.4.0beta4 in both machines.

May be it is a bug in v2.4.0
I have talked about this in this posts (with no response till now).

https://meta.discourse.org/t/is-latest-release-105-and-v2-4-0beta4-105-the-same/129415

Here I ask for the best way to plan a disaster recovery method.
The backups don’t tell you easily which is the version of discourse and plugin it contains, and when you install discourse in a new machine you have no control of the version of discourse/plugins you are installing, as long as I know, it installs latest versions.