# S3 Bucket wijzigen en alle verwijzingen

**URL:** <https://meta.discourse.org/t/changing-s3-bucket-and-all-references/167117>\
**Category:** Product Support\
**Created:** [13 oktober 2020 om 19:26 UTC](https://meta.discourse.org/t/changing-s3-bucket-and-all-references/167117 "2020-10-13T19:26:29Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Samir\_Faci](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samir_faci/32/119582_2.png) [@Samir\_Faci](https://meta.discourse.org/u/Samir_Faci)\
**Post date:** [13 oktober 2020 om 19:26 UTC](https://meta.discourse.org/t/changing-s3-bucket-and-all-references/167117/1 "2020-10-13T19:26:29Z")

</div>

I changed the S3 bucket for my website and copied all the assets to the new one. Everything is the same, I also made sure that all the files are publically readable at the very least

```plaintext
 for i in $(cat files.txt | awk '{print $4}'); do aws --profile gb_root s3api put-object-acl --bucket gb-www-forum --key $i --acl public-read ; done;

```

Some of the URLs and Images that it’s referencing are still based on the old bucket name.

For example: the Logo URL is set to:

[https://geek-beacon-www-forum.s3.dualstack.us-west-1.amazonaws.com/original/2X/8/8d0ac51fff56cdc704af2807c1c2efee13a3fd89.png](https://geek-beacon-www-forum.s3.dualstack.us-west-1.amazonaws.com/original/2X/8/8d0ac51fff56cdc704af2807c1c2efee13a3fd89.png)

that was an old bucket that should all be referencing the new bucket name.

**Things I’ve tried:**

### Rebake

```plaintext
cd /var/discourse
./launcher enter app
rake posts:rebake

```

That work successfully but didn’t change anything.

### Remap (Failed to Invoke)

Remap was mentioned but can’t seem to figure out how to make this work.

```plaintext
root@forum-app:/var/www/discourse# rake --tasks | grep remap
rake posts:remap[find,replace,type,ignore_case] # Remap all posts matching specific string
root@forum-app:/var/www/discourse# rake posts:remap["geek-beacon-www-forum", "gb-www-forum", "string", false]
rake aborted!
Don't know how to build task 'posts:remap[geek-beacon-www-forum,' (See the list of available tasks with `rake --tasks`)
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)

```

---

_[View the full topic](https://meta.discourse.org/t/changing-s3-bucket-and-all-references/167117)._
