# Backup upload failing

**URL:** https://meta.discourse.org/t/backup-upload-failing/45140
**Category:** Support
**Created:** [June 2, 2016, 3:07pm UTC](https://meta.discourse.org/t/backup-upload-failing/45140 "2016-06-02T15:07:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![tim.smith](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tim.smith/32/119954_2.png) [@tim.smith](https://meta.discourse.org/u/tim.smith)
#### Post date: [June 2, 2016, 3:07pm UTC](https://meta.discourse.org/t/backup-upload-failing/45140/1 "2016-06-02T15:07:35Z")

</div>

I’m trying to restore my discourse site, but I can’t upload backups. It eventually fails with a 500 error (though that’s probably irrelevant).

The JavaScript console is showing that it’s trying to post to [Login | HSTS Redirection Community](https://site.com/admin/backups/upload). The issue with this is that the path isn’t valid. The site is configured to use a subfolder per these instructions: [Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/subfolder-support-with-docker/30507). It looks like the upload function isn’t respecting that and is leaving out the value specified in DISCOURSE\_RELATIVE\_URL\_ROOT.

I’m not currently able to manually upload files to the server (AWS EC2 instance with lots of security). The site is also configured to use S3 for backups, but Discourse doesn’t see the backups uploaded manually to S3. Discourse doesn’t see _any_ of the backups after resetting the EC2 instance.

Does anyone have any ideas how to fix this? My discourse instance is completely broken until I can load a backup.

Update:  
I was able to work around the alleged bug and my limitations by turning of S3 config, uploading the backup as an attachment to a post, SSHing into the server to copy it from the uploads folder to the backups folder, renaming to its original name, and then it showed on the backups page and I could click the button to restore that backup.

The original issue remains, however. This is still a blocker for me as I do not have SSH access to the prod instance to move and rename the file.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 2, 2016, 5:54pm UTC](https://meta.discourse.org/t/backup-upload-failing/45140/2 "2016-06-02T17:54:16Z")

</div>

@zogstrip is there a bug with subfolder logic here?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 2, 2016, 5:55pm UTC](https://meta.discourse.org/t/backup-upload-failing/45140/3 "2016-06-02T17:55:02Z")

</div>

I will have a look, pretty sure I haven’t tested that use case :frowning:

---

<div class="post-metadata">

### Author: ![tim.smith](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tim.smith/32/119954_2.png) [@tim.smith](https://meta.discourse.org/u/tim.smith)
#### Post date: [June 7, 2016, 2:08pm UTC](https://meta.discourse.org/t/backup-upload-failing/45140/4 "2016-06-07T14:08:34Z")

</div>

Have you been able to track this down?

---

<div class="post-metadata">

### Author: ![nckackerman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nckackerman/32/121705_2.png) [@nckackerman](https://meta.discourse.org/u/nckackerman)
#### Post date: [June 20, 2016, 2:59pm UTC](https://meta.discourse.org/t/backup-upload-failing/45140/5 "2016-06-20T14:59:35Z")

</div>

I have run into this issue as well. Has any progress been made here? Can we expect a fix?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 20, 2016, 3:42pm UTC](https://meta.discourse.org/t/backup-upload-failing/45140/6 "2016-06-20T15:42:11Z")

</div>

Sorry about the delay. Here’s the fix :rotating_light:

[https://github.com/discourse/discourse/commit/68c158d5920ffcb76655d928fb80f5ca28c8d19d](https://github.com/discourse/discourse/commit/68c158d5920ffcb76655d928fb80f5ca28c8d19d)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 23, 2016, 8:44pm UTC](https://meta.discourse.org/t/backup-upload-failing/45140/7 "2016-06-23T20:44:34Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
