Default backup frequency


(Jay Pfaffman) #1

Why is the default to back up Discourse once a week?

Use case: I just goofed an upgrade (and an app.yml got cranked up instead of web_only.yml and I guessed wrong about which one had been running for the last two days) and lost a couple days of someone else’s data. It would have been considerably less painful if a backup had run in the past 24 hours.

I recommend daily backups and keeping 3. Digital Ocean’s 1GB droplet has only 25GB of disk and it’s easy to fill it up with backups.


(Christoph) #2

The downside, however, would be that your 5 default backups would only cover the past 5 days instead of the past 5 weeks.

Regardless of the default settings, I think it would be nice to have a more sophisticated data retention policy, like: keep 1 backup per day from the past 7 days and 1 backup from the past month.

But then again, it’s probably easier to send loads of backups to your cloudstorage and then do the pruning there…


(Jay Pfaffman) #3

Perhaps there’s something that I’mi missing, but the likelihood that one would think, “oh! I want to throw away everything that’s happened on my forum for the past 5 weeks and restore that backup” seems fairly remote. More often what you want is a backup from 5 minutes ago.

If you’re someone who can take a 5 week old backup, extract some gem, and restore to the current one, well, you probably have a sophisticated backup scheme and a data retention policy.


(Christoph) #4

It’s not so much about wanting to use an older backup when you have a newer one but about having a functioning backup at all (otherwise there is no reason for discourse to keep multiple backups at all), e.g. when newer backups fail and are incomplete, for whatever reason or the database becomes corrupted (and hence also the backup) but you don’t realize that until weeks later…

But I agree that your worst case scenario is more common and should be prioritized. In fact, wasn’t aware of the weekly backups until I saw this topic and quickly changed it to daily.


(Jay Pfaffman) #5

Oh, yeah. And having a backup that’s non-functional has been a serious issue a few times lately.

See there? :slight_smile:


(Jeff Atwood) #6

Really not a fan of these “I just did an accidental thing and therefore Discourse must be changed to make this accidental thing less possible” topics.

Unless you mean hundreds of people across dozens of unique Discourse instances, of course :wink:


(Jay Pfaffman) #7

While my mistake was what precipitated this post, I’ve not understood this default from the first time I installed discourse.

A week seems like a long time between backups.

Five backups will fill up a 25gb ssd pretty quickly. And I have had to reduce the number of backups many times because a disk got filled.


(Felix Freiberger) #8

Do you like “I did change this setting, it was awesome and I want everyone to have it”-posts?

I’ve changed this setting to 1 day on all my installs, and it has saved my behind at least once :wink:


(Jeff Atwood) #9

That is why settings exist, so they can be changed to match your personal tastes.