# Backups failing, and admin page inaccessible

**URL:** https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536
**Category:** Support
**Created:** [11월 7, 2018, 2:36오후 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536 "2018-11-07T14:36:55Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Aquarion](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aquarion/32/124278_2.png) [@Aquarion](https://meta.discourse.org/u/Aquarion)
#### Post date: [11월 7, 2018, 2:36오후 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/1 "2018-11-07T14:36:55Z")

</div>

Since the most recent update, I’ve been getting error messages like this daily:

The backup has failed.

Here’s the log:

```plaintext
BackupRestore::BackupStore::StorageError
/var/www/discourse/lib/backup_restore/s3_backup_store.rb:63:in `rescue in unsorted_files'
/var/www/discourse/lib/backup_restore/s3_backup_store.rb:51:in `unsorted_files'
/var/www/discourse/lib/backup_restore/backup_store.rb:21:in `files'
/var/www/discourse/lib/backup_restore/backup_store.rb:26:in `latest_file'
/var/www/discourse/app/jobs/scheduled/schedule_backup.rb:11:in `execute'
/var/www/discourse/app/jobs/base.rb:137:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.4/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:127:in `block in perform'
/var/www/discourse/app/jobs/base.rb:123:in `each'
/var/www/discourse/app/jobs/base.rb:123:in `perform'
/var/www/discourse/app/jobs/base.rb:185:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.8.1/lib/mini_scheduler/manager.rb:81:in `process_queue'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.8.1/lib/mini_scheduler/manager.rb:29:in `block in initialize'

```

And if I try to go to the admin/backups page, I get an unsmiley face and:

`Error while trying to load [/admin/backups.json](https://[forum]/admin/backups.json)`

If I go to that URL, I get - while logged in as admin - “Access Denied”

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [11월 7, 2018, 3:35오후 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/3 "2018-11-07T15:35:07Z")

</div>

> [@Aquarion](#):
>
> I’ve been getting error messages like this daily

You probably enabled daily backups and the system tries to store them on Amazon S3, but gets an “Access Denied” error. First thing you could do is switching to local backup storage by going to `/admin/site_settings/category/all_results?filter=backup%20location` and changing the setting to “Local”.

If you want to store the backups on S3, please make sure that the S3 credentials are still valid. I recommend following the [Configure automatic backups for Discourse](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855) guide.

And yes, I know, the error handling at `/admin/backups` could be improved. I’ll work on that…

---

<div class="post-metadata">

### Author: ![Aquarion](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aquarion/32/124278_2.png) [@Aquarion](https://meta.discourse.org/u/Aquarion)
#### Post date: [11월 7, 2018, 3:47오후 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/4 "2018-11-07T15:47:33Z")

</div>

Aha, thanks.

It turns out that the IAM policy was missing a couple of things that are now required. Working great now.

---

<div class="post-metadata">

### Author: ![shireeshj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shireeshj/32/253956_2.png) [@shireeshj](https://meta.discourse.org/u/shireeshj)
#### Post date: [11월 8, 2018, 3:31오전 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/5 "2018-11-08T03:31:57Z")

</div>

If you could list the things that need to be added to the IAM policy, It would be of great help. Thanks

---

<div class="post-metadata">

### Author: ![Aquarion](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aquarion/32/124278_2.png) [@Aquarion](https://meta.discourse.org/u/Aquarion)
#### Post date: [11월 8, 2018, 9:55오전 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/6 "2018-11-08T09:55:15Z")

</div>

I followed the guide linked above, the full IAM policy is in [Set up file and image uploads to S3](https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229) , which I’m linking to rather than pasting in as that’s likely to be updated in the future and this isn’t 😃

---

<div class="post-metadata">

### Author: ![blimmer](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@blimmer](https://meta.discourse.org/u/blimmer)
#### Post date: [2월 5, 2019, 12:12오전 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/7 "2019-02-05T00:12:47Z")

</div>

After updating today to these versions:

 ![53](https://global.discourse-cdn.com/meta/original/3X/8/6/86e7cb8d2f4ac219a22f0191900c4eb60bbae390.png)

I’m now getting this error. My policy looks right from the guide and nothing else changed. Is there any more debugging I can do to track down what happened?

 ![14](https://global.discourse-cdn.com/meta/original/3X/c/6/c603cfb0fd431ed08ab937240895f165aa0157ec.png)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2월 5, 2019, 1:41오전 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/8 "2019-02-05T01:41:05Z")

</div>

Something will show up in logs, can you have a look:

> [@Where does Discourse store and show logs?](https://meta.discourse.org/t/where-are-all-the-discourse-logs/58022):
>
> When troubleshooting issues or errors with Discourse it is important you look at your logs. Here’s a listing of where they are and what’s in there. Your site domain Administration logs shown in the UI The Discourse admin panel contains several forms of logging: Emails that are sent, skipped, bounced, received and rejected are logged at https://=DOMAIN=/admin/email-logs and the neighboring tabs. Staff actions are logged at https://=DOMAIN=/admin/logs/staff\_action\_logs Email addresses an…

---

<div class="post-metadata">

### Author: ![blimmer](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@blimmer](https://meta.discourse.org/u/blimmer)
#### Post date: [2월 6, 2019, 4:41오후 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/9 "2019-02-06T16:41:43Z")

</div>

Thanks Sam, It was a pretty generic “Access Denied” error. I recreated the role per this post: [Set up file and image uploads to S3](https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229) and it started working again.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2월 20, 2022, 7:05오후 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/10 "2022-02-20T19:05:58Z")

</div>



---

<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: [2월 21, 2022, 4:08오전 UTC](https://meta.discourse.org/t/backups-failing-and-admin-page-inaccessible/101536/11 "2022-02-21T04:08:26Z")

</div>


