# Probleem met het herstellen van back-up--SiteSetting::Upload.s3\_base\_url mislukt--omdat enable\_s3\_uploads in de database is ingesteld

**URL:** <https://meta.discourse.org/t/trouble-restoring-backup-sitesetting-upload-s3-base-url-is-failing-because-enable-s3-uploads-was-set-in-database/215966>\
**Category:** General\
**Created:** [25 januari 2022 om 17:57 UTC](https://meta.discourse.org/t/trouble-restoring-backup-sitesetting-upload-s3-base-url-is-failing-because-enable-s3-uploads-was-set-in-database/215966 "2022-01-25T17:57:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<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:** [25 januari 2022 om 17:57 UTC](https://meta.discourse.org/t/trouble-restoring-backup-sitesetting-upload-s3-base-url-is-failing-because-enable-s3-uploads-was-set-in-database/215966/1 "2022-01-25T17:57:35Z")

</div>

I have a backup from the default site on a multisite instance. Uploads are on S3. I have successfully created a backup with `include_s3_uploads_in_backups` set to true.

When I try to restore this from the command line on either another multisite instance (with s3) or a fresh [standard install](https://meta.discourse.org/t/142537?silent=true), I get an error: `Something went wrong while remapping uploads`.

I have added a bunch of `puts` to `lib/backup_restore/uploads_restorer.rb` and have pinned down that this will cause the error:

```
  puts "base url #{SiteSetting::Upload.s3_base_url}"

```

the next, which seems to be the one that was failing before my debugging, line is:

```
       current_s3_base_url = SiteSetting::Upload.enable_s3_uploads ? SiteSetting::Upload.s3_base_url : nil

```

I’ve tried commenting out various s3 variables in `discourse.conf` to see if there is some bad value in the database that’s somehow causing the problem, but they are all empty.

Hmm. And on the clean install, the backup failed and now the site returns

```plaintext
{
errors: [
"`s3_upload_bucket` site setting has to be set."
]
}

```

So maybe some other s3 setting is set in the database that I misssed. Yes `enable_s3_uploads` is set in the database. I am confused about the relationship between `use_s3` and `enable_s3_uploads`…

---

_[View the full topic](https://meta.discourse.org/t/trouble-restoring-backup-sitesetting-upload-s3-base-url-is-failing-because-enable-s3-uploads-was-set-in-database/215966)._
