# Discourse s3 backup folder

**URL:** https://meta.discourse.org/t/discourse-s3-backup-folder/338257
**Category:** Support
**Created:** [November 25, 2024, 3:12pm UTC](https://meta.discourse.org/t/discourse-s3-backup-folder/338257 "2024-11-25T15:12:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cmdntd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmdntd/32/192008_2.png) [@cmdntd](https://meta.discourse.org/u/cmdntd)
#### Post date: [November 25, 2024, 3:12pm UTC](https://meta.discourse.org/t/discourse-s3-backup-folder/338257/1 "2024-11-25T15:12:15Z")

</div>

When uploading to s3, discourse will save backups to the `default` folder  
this makes the default download link of discourse here unusable:  
`https://domain.com/admin/backups/backup.tar.gz?token=id`

must manually edit the above link as follows to use:  
`https://domain.com/admin/backups/default/backup.tar.gz?token=id`

how to configure this problem?

---

<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: [November 26, 2024, 12:34am UTC](https://meta.discourse.org/t/discourse-s3-backup-folder/338257/2 "2024-11-26T00:34:06Z")

</div>

~~You might be able to do something like this-[Replace a string in all posts](https://meta.discourse.org/t/replace-a-string-in-all-posts/48729)~~

---

<div class="post-metadata">

### Author: ![cmdntd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmdntd/32/192008_2.png) [@cmdntd](https://meta.discourse.org/u/cmdntd)
#### Post date: [November 26, 2024, 4:48pm UTC](https://meta.discourse.org/t/discourse-s3-backup-folder/338257/3 "2024-11-26T16:48:23Z")

</div>

**Is there any way to limit this to just the backups settings area?**

This looks a bit dangerous, because if there is another matching character in the entire database, it will be overwritten:

```yml
hooks:
  after_code:
    - exec:
        cd: $home
        cmd:
          - >
            rails r "
            Post.where(\"cooked LIKE '%/admin/backups/%'\").find_each do |post|
              post.cooked = post.cooked.gsub('/admin/backups/', '/admin/backups/default/');
              post.save!;
              post.revise(Discourse.system_user, post.cooked, bypass_rate_limiter: true);
            end
            "
          - >
            rails r "
            Upload.where(\"url LIKE '%/admin/backups/%'\").find_each do |upload|
              upload.url = upload.url.gsub('/admin/backups/', '/admin/backups/default/');
              upload.save!;
            end
            "

```

---

<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: [November 26, 2024, 11:30pm UTC](https://meta.discourse.org/t/discourse-s3-backup-folder/338257/5 "2024-11-26T23:30:12Z")

</div>

sorry i misread your post earlier thinking you were talking about a migrated forum links for some reason.

this seems like something isn’t set up properly.

has it always been this way or did you change something?

> [@cmdntd](#):
>
> backups to the `default` folder  
> this makes the default download link of discourse here unusable

> [@Configure automatic backups for Discourse](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855):
>
> bookmark This guide explains how to configure automatic backups for Discourse, including storage options on local servers and S3-compatible storage. Learn how to set up automatic backups for your Discourse platform. This guide covers configuring automatic backups, storing them on local servers or S3-compatible storage, and managing storage retention options like Amazon Glacier. Configuring automatic backups Navigate to /admin settings. Select the Backup section. Set backup\_frequency to …

---

<div class="post-metadata">

### Author: ![cmdntd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmdntd/32/192008_2.png) [@cmdntd](https://meta.discourse.org/u/cmdntd)
#### Post date: [November 27, 2024, 1:38pm UTC](https://meta.discourse.org/t/discourse-s3-backup-folder/338257/6 "2024-11-27T13:38:51Z")

</div>

I 'm trying to setup with `seaweedfs` s3. But it seems not to be here:

> [@Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916):
>
> information_source This topic covers how to configure some common S3 compatible Object Storage providers (S3 clones). See [Set up file and image uploads to S3](https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229) for more details about Amazon AWS S3 configuration, which is officially supported and used internally by Discourse for our hosting services. Provider Service Name Works with Discourse? [Amazon AWS](#aws-s3-2) S3 Yes [Digital Ocean](#digital-ocean-spaces-3) Spaces Yes [Linode](#linode-object-storage-4) Object Storage Yes [Google Cloud](#google-cloud-platform-storage-5) Storage Yes [Scaleway](#scaleway-object-storage-6) Object Storage Yes [Vultr](#vultr-object-storage-7) Obj…
