Restore versions out of sync

Hi,

Just in the middle of a migration…

I’ve just built a new Discourse instance, single container, but am getting the following error when trying to restore via the CLI:

Validating metadata…
Current version: 20200713071305
Restored version: 20201006172700
EXCEPTION: You’re trying to restore a more recent version of the schema. You should migrate first!

How would the brand new server be on an older version? How to bring it up to the required version?

Many thanks

1 Like

It’s a bug in the old version, as it suggests it’s from the future.

I think that there was a topic about it, but it might have been deleted. I think that you might be able to rename the backup to something with something less than 20200713071305 in the filename, but you might need to upgrade the old site and make a new backup.

2 Likes

Correct, your best bet is updating the old site so that it has this commit which fixes the incorrect migration date:

4 Likes

We might have the same issue, but don’t have the luxury of updating our source backup first. @Rob_Spencer did renaming the backup to something with something less than 20200713071305 in the filename work by chance?

1 Like

No. If you can’t upgrade the source, you’ll need to restore that database by hand and then migrate.

1 Like

While my question was pending, a team member wanted to try it out, so renamed ...-2020-07-24-033619-v20201303000002.tar.gz to ...-2020-07-24-033619-v20200525072637.tar.gz (the latest backup version, minus 1) and it seems to have worked.

Can’t find anything wrong with the restored data. Anything in particular we should look at?

1 Like

Hmm. Well when I tried renaming it didn’t work for some reason.

If it restored at all you’re probably just fine!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.