What are the most basic but reliable ways to ensure a Discourse forum can always be recovered?

AI-generated summary

The discussion addresses basic yet reliable strategies for ensuring a Discourse forum can always be recovered. Canapin initiates the thread by describing a simple setup for non-sysadmins: renting a Hetzner server, enabling automated Discourse backups, and syncing them to Google Drive via rclone and cron jobs. However, Canapin notes the fragility of this method, as token refreshes can fail silently without alerts, necessitating manual checks. The core question posed is how to guarantee safe recovery if the forum is destroyed, referencing incidents like the OVH fire.

Ed_S shares a hybrid approach involving rsync over SSH by a moderator and manual downloads during updates, acknowledging the risk of losing up to a month’s data if automated checks fail. Ed_S also highlights the importance of dual administration for domain control to prevent total loss if one admin becomes unavailable. NateDhaliwal recommends using S3 for daily backups and VPS snapshots for extra safety, linking to official best practices. Jagster mentions hourly database backups, emphasizing that the acceptable timeframe for data restoration depends on the administrator’s tolerance for loss.

Regarding storage, pfaffman advocates for S3 backups, noting that restoring only requires the YML configuration files and S3 credentials, which prevents local disk bloat. However, pfaffman warns against relying solely on one cloud provider, citing an example where an AWS account loss resulted in permanent data loss. Ed_S agrees, urging users not to store all copies with a single provider. satonotdead proposes a three-copy strategy (host, cloud, and offline USB/optical), while Lilly suggests Cloudflare R2 for its ease of management and restoration.

Ed_S concludes by framing backup strategies around a threat model, listing risks such as fires, provider policy changes, administrative disputes, and silent backup failures. The summary highlights that redundancy across multiple providers and verification of backup integrity are critical for true resilience. Canapin’s original setup and Ed_S’s threat model provide practical perspectives for both novice and experienced self-hosters.

Over the years I’ve helped friends hosting their own forum.

I’ve made them rent a Hetzner server, set up automated backups on Discourse, and I sync them to my Google Drive with rclone and a cron task. Each admin of each forum has access to their own backups on my Drive. It’s the simplest and safest I could imagine as a non-sysadmin.

A few times, I noticed the tokens were not refreshed on rClone (at least on one instance) and I had to reconfigure it. Because I have no alerts whatsoever if a sync doesn’t work, I just manually look at my Drive from time to time and ensure the last backups are recents.

If you were to voluntarily help someone or an association host a forum, what solution would you set up to ensure there are always backups somewhere that can be safely recovered if the forum blows up for some reason)?

I pull backups using rsync over ssh, with a restricted account, from a cronjob. Well, I don’t, but one of my mods does. I take and download a backup when I do an update. So, in the one case we could lose a few days of forum activity, and in the other case we could lose a month or more.

I should probably set up a crontab of my own. I could also increase the frequency of backups - presently set to 2 days.

In both cases we have to be moderately competent admins of our own systems. We should only lose the forum if both of us lose our downloaded copies and our own backups as well as the server itself.

Edit: good point, one must have some positive check that the process is working, and some idea, however shallow, that the downloaded backups are good.

I haven’t taken special care of the domain: ideally that too would have dual administration and joint ownership of some sort. If we lost control, the forum would have to reappear on a new domain - it could send digests and notifications to the members by email, so with a bit of trust they could rejoin.

S3 for backups, I’d recommend. Daily backups of the forum if you want to be safe. Backups of the VPS, if you want to be extra-safe.

There’s also:

Well, I’m backupping the database every hour :man_shrugging: It is same principle than with e-commerce — one must consider what is the biggest timeframe what can and/or wants to restore.

Backing up to S3 and an external drive using restic

Agreed. If you’ve got the YML file(s) with the S3 configuration and backups on S3, then all you need to restore the forum on a new server is the YML file(s). This has the added benefit of not filling your disk with backups.

CAVEAT: You have to remember to pay the bill for the S3 bucket as well as the VM. I think maybe cloudflare’s is the cheapest?

I have had someone somehow lose control of their AWS account and lost all of their images. So just remembering to pay the bill is a cost not to be underestimated.

Exactly this - don’t have all copies of your data with one provider.

I like to have three encrypted copies, one in host, other cloud (S3 compatible) and the final in optical HD or USB drive.

Planning to backup in decentralized storage, I am currently exploring the reliability of the available options as well.

I currently perform a backup once a day and upload it.

The database is backed up using Discourse’s built-in backup feature, while the original images are backed up incrementally every day using restic.

Everything is uploaded to a cloud storage service, but the current drawback is that it only uploads to a single provider. Ideally, we should upload to multiple cloud storage services in the future.

use offsite backups and object storage. i use cloudflare R2 (S3 compatible) and have restored to different servers a number of times. easy to manage and restore. also, use a dual container build.

A useful tactic for these kinds of questions is to consider the threat model.

We’ve already seen some of these

  • fire destroys the building that contains your server
  • you lose control of the account with your provider
  • the person with control over your domain is permanently unavailable
  • you lose access to an email account
  • your backups turn out to be out of date because something stopped working
  • you cannot restore your backups for some technical reason
  • your forum admin is permanently unavailable or uncooperative

In short

  • buildings burn or flood
  • people fall out with each other, or die
  • companies change policies and make arbitrary decisions
  • any single copy of data can turn out to be bad or inaccessible

Consider each of those, for each person, company, copy, and see what your vulnerability looks like.

git-annex — feel free to take a look if the technical aspects don’t scare you