Best way to recover from backups with plugins?

We have recently upgraded to discourse from vbulletin.

We are yet learning how to use discourse and its tools.

One of my concerns is disaster recovery.

We have automatic snapshots that we keep for long time.

We make daily backups using the tools inside discourse and saved in S3 bucket during 15 days.

Recovering from a snapshot is quite straight forward.
The idea is to recover from the last available snapshot that works and then use the last available backup to restore the content.

I needed a test machine to try some discourse plugins.

So it was a good opportunity to try the disaster recovery plan.

But instead of using a snapshot I tried to recover from scratch (just in case everything goes bad and we have to begin from scratch to restore an available backup).

I created a Debian machine, updated the software and installed discourse from scratch (with no plugins installed just the bare minimum).

I configured https to get it working and after that I tried to restore the last backup.

It failed while updating the database.

It complained about some columns not present in some tables. It rolled back and I had again the same content: almost nothing.

Reading the erros and some threads here I realized it might be caused by different discourse versions.

I checked for it. Yes the new forum had a version a bit newer than the original one.

I upgraded the original forum to the latest version and made a backup.

I tried to restore it and it again failed with similar errors.

So it might be that the new forum did not have installed the same plugins.

So I modified app.yml to install them rebuild the app. And tried again.

This time it worked nicely.

But it kept me worried.

If you have to restore the backup in a machine with exactly the same plugins and versions installed it will be quite difficult to get a successfull restore.

This time my old forum was up and running and it was easy to check the versions and update it to the newest one.

But when you are recovering from a disaster, you don’t have the chance to check versions or upgrade the software.

How do you solve it?

Does the backup have information about the installed plugins and discourse and plugin versions?

How do you create a basic discourse instance with the appropiate discourse and plugins versions in order to match that of your backup?

Thank you in advance for your guidance.

2 Likes

It is rare for plugins to mess around with the database.

1 Like

Jeff the problem is not that a plugin is not working.

IT seems that when you restore a backup you need to be running exactly the same release version of discourse and have installed the same plugins you were running in the origin of the backup.

But when you recover a backup from time ago you don’t know exactly which versions and plugins you were running at that time.

It would be helpfull that you could list the version and plugins that were installed when the backup was made, from the backup file and seeing it in the restore interface.

No, this is not true.

Are you running third-party plugins? I don’t think this will happen with official Discourse plugins to my knowledge.

1 Like

So you don’t need to be running exactly the same version that the backups has in order to restore it?
I had some error restoring and I thought it was due to versions not being the same.

Being able to review the discourse version, and plugins version of a backup prior to restore would be of help.

I am running Just one third party plugin: topic list preview.

I was able to restore the backup after several retries (without changing anything).
Oddly enough, one of them restore with no error.

I could see that I was not the only one having the problem: