Support for automatic backup encryption (GPG?)

backup

(Jack Coulter) #1

Hi there,

I’m one of the IT officers of Pirate Party Australia, and last year set up a self-hosted Discourse instance for the party which has been going quite well. While we use the automated backup functionality, sadly we can’t use the built-in S3 upload functionality, as internal policy mandates that any data stored with third-party services must be encrypted locally.

While it’s not too difficult to simply write some external script invoked via cron to encrypt the backup archives then upload to S3 outside of Discourse, it’s admittedly a bit of a hack. Since Discourse itself supports automatic backups (& upload to S3), it’d be great if there was support for automatically encrypting (ideally via GPG, since that’s already widely used and due to its asymmetric nature, no passphrases would be required during back up operations) backup archives before uploading to S3.

Is there any possibility of such functionality being implemented?


(Sam Saffron) #2

Yeah we support such a change, if anyone feels like picking it up let us know. Otherwise, maybe for next release or the release after.


(Kane York) #3

Word of advice: you (in particular) will likely want to rename, let’s say one backup a month, to a name that Discourse won’t auto-delete when it reaches the maximum daily backups limit, and mirror that selected one elsewhere.

Just breaking the date format should suffice to avoid the auto-deletion (e.g. 2015-02-11 into 2015_Feb or something like that).

You’ll also be able to be a bit more lax in where you put the backups, because they’re encrypted and the private key is offline.

(Further explaining that: Backups contain all the private messages and drafts stored on the server! Which is why there’s a standard admonishment to not let non-admins get backups.)


(Marcin Cieślak) #4

Two ideas to consider for the future:


(Manthan Mallikarjun) #5

Instead, why not let us run custom scripts after/before/during backup. That way we can customize it however we want.