Can't restore a snapshot instance

AI-generated summary

A user, eextra, is experiencing issues restoring a snapshot instance from Lightsail, despite successful installation and forum backup. The problem persists across different providers and domains, with port connection errors. Stephen suggests snapshots aren’t supported due to potential inconsistencies, recommending the use of built-in backup mechanisms instead.

eextra questions the variables causing these issues, comparing them to comparable systems like NodeBB. They express concern that relying on AWS/Azure backups might be useless.

However, md-misko offers a solution using Azure’s backup feature with pre and post scripts to ensure database consistency on restore, which has been proven to work. codinghorror acknowledges that getting snapshot restore to work is possible with effort.

I can’t restore a snapshot instance.

I’m testing in different ways. Installation, forum backup works well, but I’m concerned about restoring a snapshot instance from lightsail.

I restore the image and everything works on the old domain but I can’t connect a new one. When assigning a different address there is a mistake that you cannot connect to the port (blocked) even though the port is unlocked (443 and also 80) ./discourse-setup and rebuild app dont work. . I check for 3 different providers and domains in a row and there is always the same problem. Ports and A record on ip are definitely well set.

Snapshots aren’t really supported, there are too many variables which could lead to an inconsistent state. You’re going to need to use the built-in backup mechanism.

What are these variables? why is this not a problem in comparable systems like node bb and others ?

Can you clarify that further?

So, basically, paying for backup on the aws/azure is completely useless ?

it is not a small problem because in principle, the very strong and robust side of the host provider becomes useless and this largely limits repair after a major failure

If you can get it to work, more power to you!

Not quite, you can set up Configure Application-Consistent Backup for Azure Linux VMs by Using Azure Backup - Azure Backup | Microsoft Learn using a pre and post script that puts Discourse into read only mode just prior to VM backup:

docker exec -i app discourse enable_readonly
docker exec -i app discourse disable_readonly

which ensures database consistency on restore (proven to work with both backup and restore of full VM).