# Kosmos.social backups are broken

**URL:** <https://community.kosmos.org/t/kosmos-social-backups-are-broken/202>\
**Category:** Support\
**Tags:** problem\
**Created:** [August 2, 2024, 3:27pm UTC](https://community.kosmos.org/t/kosmos-social-backups-are-broken/202 "2024-08-02T15:27:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![colby](https://community.kosmos.org/user_avatar/community.kosmos.org/colby/32/216_2.png) [@colby](https://community.kosmos.org/u/colby)\
**Post date:** [August 2, 2024, 3:27pm UTC](https://community.kosmos.org/t/kosmos-social-backups-are-broken/202/1 "2024-08-02T15:27:08Z")

</div>

kosmos.social used to email S3 links when requesting a backup. For example:

[https://s3.kosmos.social/backups/dumps/000/000/007/original/archive-20230413141919-[...].tar.gz](https://s3.kosmos.social/backups/dumps/000/000/007/original/archive-20230413141919-%5B...%5D.tar.gz)

Now it gives links like:

[https://kosmos.social/backups/10/download](https://kosmos.social/backups/10/download)

… which, if you’re authorized, redirects to:

[http://localhost:3900/kosmos-social/backups/dumps/000/000/010/original/archive-20240801003321-[...].zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=[...]](http://localhost:3900/kosmos-social/backups/dumps/000/000/010/original/archive-20240801003321-%5B...%5D.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=%5B...%5D)

(instead of s3.kosmos.social).

---

<div class="post-metadata">

**Author:** ![raucao](https://community.kosmos.org/user_avatar/community.kosmos.org/raucao/32/138_2.png) [@raucao](https://community.kosmos.org/u/raucao)\
**Post date:** [August 4, 2024, 12:16pm UTC](https://community.kosmos.org/t/kosmos-social-backups-are-broken/202/2 "2024-08-04T12:16:16Z")

</div>

Thanks for the report, and welcome to the forums!

I found the upstream issue for this bug:

> <https://github.com/mastodon/mastodon/issues/24380>
>
> \### Steps to reproduce the problem
> 
> 1. Request an archive of your account
> 2. Cl…ick "Download your archive" Link in Email notification
> 3. User is redirected to link based on S3\_ENDPOINT setting, not S3\_ALIAS\_HOST
> 4. Manually replace S3\_ENDPOINT value in link with S3\_ALIAS\_HOST; download will work
> 
> \### Expected behaviour
> 
> User should have received link based on S3\_ALIAS\_HOST
> 
> \### Actual behaviour
> 
> User received link based on S3\_ENDPOINT
> 
> \### Detailed description
> 
> Requesting a download of one's account archive produces a user-facing link to S3\_ENDPOINT instead of S3\_ALIAS\_HOST. In our setup, this will not work, because S3\_ENDPOINT is a private VLAN-accessible endpoint that we do not want to expose to end users. S3\_ALIAS\_HOST should be used instead, as it is for the distribution of other user-uploaded files.
> 
> \### Specifications
> 
> Mastodon 4.1.1
> Ruby 3.0.4p208
> PostgreSQL 15.1
> Redis 5.0.7

---

<div class="post-metadata">

**Author:** ![raucao](https://community.kosmos.org/user_avatar/community.kosmos.org/raucao/32/138_2.png) [@raucao](https://community.kosmos.org/u/raucao)\
**Post date:** [August 4, 2024, 1:01pm UTC](https://community.kosmos.org/t/kosmos-social-backups-are-broken/202/3 "2024-08-04T13:01:38Z")

</div>

**Update:** fixed in [#564 - Fix download URLs for Mastodon exports/archives - chef - Gitea](https://gitea.kosmos.org/kosmos/chef/pulls/564) (already running on kosmos.social, so downloads should work again, both from e-mail and Web links)
