Automatic Backup to S3 not happening - Backup runs but doesn't upload unless performed manually via Admin UI


I have Discourse deployed in an EKS cluster and utilise IAM Roles for Service Accounts to allow access to 2 S3 buckets - one for assets and one for backups. The flag s3_use_iam_profile is set to true.

My settings are configured so that the backup is daily and should upload to the S3 backup bucket. However, I am seeing the backup run in the logs but when it finishes and should upload to S3 it just skips that step as if it has not been set.

I found this old post - Discourse does not support service account and IAM role for S3 backup - that using IRSA or an IAM profile doesn’t work. Now, if I run the backup manually via the Admin UI it completes and uploads to S3 so is there something else I need to set to make this happen automatically?

Many thanks,


I don’t know. Here’s what I’d check next.

Could your EKS be getting killed before the backup gets compressed and pushed to S3? Maybe out of space or something like that?

Hi Jay,

Everything looks fine. The pod logs show the automatic backup completing successfully and ending ok. It looks like the check on whether remote is enabled is returning false incorrectly.

We are running v3.0.1 which was built from this commit - Commits · discourse/discourse · GitHub

Looking at the code this is the line that is returning - discourse/backuper.rb at 4571b10ee5a3c46249271b2870d6eaf37994460f · discourse/discourse · GitHub

Have found 2 interesting things:

1 - When I run the backup manually in the admin UI it completes successfully and the compressed gzip file is uploaded to S3.
2- It looks like the line of code above has changed since v3.0.1 - the line has gone from return unless @store.remote? to return unless store.remote? - my Ruby is not great but Google tells me an @variable is an instance variable of self so is there another setting I need to make to get this to work with v3.0.1 or should I upgrade to v3.0.2?

Thanks again.

Again, I don’t know, but as a rule, if you have some strange behavior, upgrading is usually a good idea.

It looks like it should be calling this:

I don’t know why it might be failing.

Ok, thanks Jay.

Will try to upgrade and see if that helps. Will let you know.


1 Like