Automatische back-up naar S3 gebeurt niet - Back-up wordt uitgevoerd, maar wordt niet geüpload, tenzij handmatig uitgevoerd via Admin UI

AI-generated summary

stevejr reports that automatic backups to S3 in their EKS-deployed Discourse (v3.0.1) complete locally but fail to upload, despite manual backups via the Admin UI working correctly. They use IAM Roles for Service Accounts (IRSA) with s3_use_iam_profile enabled. Logs show backups finishing successfully, but the upload step is skipped — likely due to @store.remote? returning false. stevejr notes that the relevant code has changed in newer versions (from @store.remote? to store.remote?), suggesting a potential version-related bug. pfaffman suggests checking for resource constraints (e.g., disk space or pod termination) and recommends upgrading as a potential fix. stevejr agrees to upgrade to v3.0.2 and will report back. The issue appears isolated to automated backups, with manual ones functioning normally, pointing to a possible configuration or code-state inconsistency in v3.0.1 related to remote storage detection.

Hi,

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,

Steve

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/lib/backup_restore/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.

Steve