# Configure automatic backups for Discourse

**URL:** https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855
**Category:** Self-Hosting
**Tags:** backups, how-to
**Created:** [April 18, 2014, 6:21am UTC](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855 "2014-04-18T06:21:44Z")
**Posts on this page:** 5
**Page:** 3

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 15, 2023, 12:11am UTC](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855/137 "2023-05-15T00:11:30Z")

</div>

Yes. If backups are on S3 and you no longer want the backups on the local drive, you can delete them.

---

<div class="post-metadata">

### Author: ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)
#### Post date: [August 24, 2023, 11:20am UTC](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855/138 "2023-08-24T11:20:39Z")

</div>

Can I only enable S3 for backups but not files or images upload?

---

<div class="post-metadata">

### Author: ![th0rgall](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th0rgall/32/293030_2.png) [@th0rgall](https://meta.discourse.org/u/th0rgall)
#### Post date: [January 25, 2024, 12:22pm UTC](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855/139 "2024-01-25T12:22:15Z")

</div>

I had the exact same question, and could not find an explicit answer here or in [Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916/1).

But, I’ve set up Scaleway S3 Object Storage _for backups only_ with these environment variables, and it seems to work. I just made a manual backup to the bucket this way using the Admin dashboard.

```bash
# Leaving the below parameters commented out 
# because they configure S3 for uploads/CDN distribution, which we don't want.
# DISCOURSE_USE_S3: true
# DISCOURSE_S3_CDN_URL:
# DISCOURSE_S3_BUCKET: 
DISCOURSE_S3_REGION: nl-ams
DISCOURSE_S3_ENDPOINT: https://s3.nl-ams.scw.cloud
DISCOURSE_S3_ACCESS_KEY_ID: <redacted>
DISCOURSE_S3_SECRET_ACCESS_KEY: <redacted>
DISCOURSE_S3_BACKUP_BUCKET: <redacted>
DISCOURSE_BACKUP_LOCATION: s3

```

Static assets are still served from my VPS, as expected & desired, and I’m not seeing any errors. I’m not sure if the scheduled backups will work, but if the manual backup worked, they should too.

~~I’ll add a note to the wiki above that these parameters can be left out if you only want to use S3 for backups, and _not_ for file or image uploads.~~  
~~Update: it’s not a wiki.~~  
Update 2: it was made a wiki at my request, thanks!

---

<div class="post-metadata">

### Author: ![Eviepayne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviepayne/32/352733_2.png) [@Eviepayne](https://meta.discourse.org/u/Eviepayne)
#### Post date: [May 19, 2026, 4:54pm UTC](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855/141 "2026-05-19T16:54:17Z")

</div>

If I have 2 redundant web containers, how can I ensure only 1 runs a backup?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 19, 2026, 5:18pm UTC](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855/142 "2026-05-19T17:18:12Z")

</div>

> [@Eviepayne](#):
>
> If I have 2 redundant web containers, how can I ensure only 1 runs a backup?

you don’t need to do anything - Discourse handles this automatically - sidekiq and redis will only run the job once, and sidekiq will only grab one of the web containers, but i don’t think you can be sure which one it is on any given backup _if you are using local backups_.

thus, you should use an external S3 bucket if you aren’t already, otherwise your backup files will likely be randomly stored across the local disks of both containers. using S3 bucket means your backup will always land in the same place.

[Previous page](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855.md?page=2)
