Alternate Backups

(N3tNinj4) #1

What is the best way to backup a full Discourse installation on Ubuntu Server Trusty Tahr? I know that S3 is built in but even if you pass the backups to Glacier it can get pricey. I would rather backup using Duplicity through SFTP and my own separate dedicated backup server on my own LAN or elsewhere or even to Dropbox since Duplicity supports it now but (my questions is simply) what directories need to be backed up for disaster recovery, especially what/where are the database files stored and do they need to be dumped from the database before backing up securely or can you just backup certain directories and still be able to restore the DBs et al.?

Many thanks.

(Sam Saffron) #2

Enable automatic daily backups in the UI and write a cron job that rsyncs that, problem solved :slight_smile:

You would backup /var/discourse/shared/app/backups/

(N3tNinj4) #3

That backsup everything including all DBs, not just settings?

(Sam Saffron) #4

the backup bundle will include images and data for all data for the site that has backups enabled.

(Mike Linksvayer) #5

Perusing the archives crated in /var/discourse/shared/app/backups and discourse/lib/backup_restore at 5504622c1b390b59f0c80dfcfc9d7408c57f36c0 · discourse/discourse · GitHub it seems app.yml is not part of the backup. Am I (very likely) overlooking it? I’d want my app.yml if I had to restore on another server. Are there any other files that I should be backing up another way, that is if they aren’t included in the generated backup archive and I’m missing them? Thanks!

(Kane York) #6

The running site has no access to that file, so it isn’t able to back it up. You have to recreate it, basically, then it’ll be fine.

(Rafael dos Santos Silva) #7