Configure automatic backups for Discourse

(Jim DeLaHunt) #47

Sometimes there will be upgrades to the Discourse software. What guarantees does the software make about forward compatibility of backups when restored to newer versions of Discourse?

That is, if I backup on Monday, upgrade Discourse on Tuesday, and attempt to restore Monday’s backup on Wednesday, what does Discourse guarantee about whether this works?

(Chris Saenz) #48

What do you want, your money back?

(Jim DeLaHunt) #49

Yeah! I’ll be rich!

No, I meant “guarantee” in the software engineering sense, rather than the commercial sense. It might be that the Discourse software is designed so that there is a format for backed-up data which is deliberately kept stable across Discourse software versions; that the backup function guarantees that what it writes will conform to this format, across versions; and that the restore function guarantees that if data is in this format, it will be restored correctly, across versions.

Or it might be that each version of Discourse software has a restore function that guarantees it can correctly restore data only from that same version of backup function, with no guarantees across versions.

(Jeff Atwood) #50

I think the way it works is that migrations are performed on older DB versions to bring them up to date. Since every db change is a migration, tracked in source control, etc.

(Kane York) #51

Yep: The behavior is, you can restore any older backup. Not backups created on a newer version of the database, though.


(Erlend Sogge Heggen) #52

I’ve always been a bit curious about this, since one of our migrations guides is pretty adamant about Discourse instances needing to be on the exact same version:

@techAPJ Should we ease down on the language here a little bit? Sounds like the most important thing is that the new instance is on a more recent or same version as the old instance.

(Jeff Atwood) #53

But there’s no reason for them not to be at the same version. If you control updates on both, and are using a Docker-based install, and can update easily, the upgrade is far easier if you keep them at the same version.

(Régis Hanol) #54

You can definitely replace the must with a should :wink: But I agree with @codinghorror, there’s no harm in upgrading your old instance first to the latest version (it’s just two clicks and some waiting) before doing a backup.

(Steven Greco) #55

I guess the senario would be that the current environment cannot be updated to the lastest because it has failed either via hardware or software issues. Now the lastest backup you have is on a previous version than that of the lastest.

(Michael Wransky) #56


I am trying to configure automatic backups for our Discourse account (we are under the Enterprise payment option). When I go to Admin -> Settings -> Backups all I see is this:

Why is it that I see no option to configure automatic backups? Is it because we have Discourse acting as our server provider?

We seriously need access to configuring this so we can set up an automated data pipeline to Chartio for data analysis.

(Jeff Atwood) #57

We handle all backups for hosted plans; they’re stored on a very expensive, ultra-redundant NetApp storage device and shipped to Amazon S3 twice a day.

You can of course trigger a manual backup any time via Admin, Backups but automated backups is one of the services we handle as part of our hosting plan.

Can you email us at with more details on what you want to do?

(Prateek) #58

@codinghorror is there a way we can find the location of the backups on the server? We don’t use Amazon, and wanted to set an external backup service.

(Dean Taylor) #59

The default location for backups is:


(Prateek) #60

Thanks @DeanMarkTaylor

(Spooky) #61

Is the backup backups and restore: db, site files and media?

(Régis Hanol) #62

What do you call “site files”?

A backup backups all the data in the database and all the uploaded images/attachments.

(Spooky) #63

Site files are the core files of Discourse, the one that exists on the server when you install Discourse.

(Régis Hanol) #64

Those are stored on GitHub - discourse/discourse: A platform for community discussion. Free, open, simple. :wink:


Why not use something as bittorrent sync or other solution to transfer the backup from vps to your own system . Is there a detailed explanation as to things are exactly included in the backup .

(Erlend Sogge Heggen) #66

Because this is easier :wink: Users are welcome to create their own plugins for this, but Amazon S3 is very widespread and seems to cover the majority of our users’ needs.

It’s pretty much all your data. If you wanna ask about some edge cases that might not be covered in a backup, you should ask about them in #support since this topic isn’t really about backups as a whole, it’s about our automatic backups feature.