# 自动备份效果时好时坏

**URL:** https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181
**Category:** Support
**Created:** [2018年六月19日 05:42 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181 "2018-06-19T05:42:31Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年六月19日 05:42 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/1 "2018-06-19T05:42:31Z")

</div>

We’ve configured backup to run every 3 days (however, that sometimes happens and other times not) Sidekiq had completed the ScheduleBackup task 5 Hours ago but no backup was created.

Reading earlier topic, I found out people having this issue if they’re low on storage or memory however, our forum is relatively happy in terms of specs (8GB RAM and 512GB Solid Storage with Quad Core)

Manually creating backup works without an error however, automatic backup sometime works and sometimes Job is triggered but no backup is created. ☹

---

<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: [2018年六月20日 00:54 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/2 "2018-06-20T00:54:58Z")

</div>

Is there anything in the logs (any of them)? [Where does Discourse store and show logs?](https://meta.discourse.org/t/where-are-all-the-discourse-logs/58022)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年六月20日 02:56 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/3 "2018-06-20T02:56:05Z")

</div>

> [@sam](#):
>
> Is there anything in the logs (any of them)?

Is there anything specific that I should be looking for?  
I was searching the logs for last few days with “backup” as the search keyword and Production.log only had entries for the manual backups I triggered or the times when I visited backup page:  
e.g.  
`Started GET "/admin/backups/status.json?_=1529382308307" for xxx.xxx.xx.xxx at 2018-06-19 05:31:30 +0000`  
I don’t think that tells much about the situation.

in the logs web UI, there are a lot of these:  
` TypeError: Discourse._registerPluginCode is not a function at https://discourse.orng.co/u/activate-account/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:46:21`  
but those are from a 11th June (backup ran successfully on 14th though!

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [2018年六月20日 05:49 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/4 "2018-06-20T05:49:16Z")

</div>

Are you seeing any symptoms similar to ours?  
[https://meta.discourse.org/t/sidekiq-restarts-missed-backups-admin-incomplete/90180](https://meta.discourse.org/t/sidekiq-restarts-missed-backups-admin-incomplete/90180)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年六月20日 05:51 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/5 "2018-06-20T05:51:16Z")

</div>

My backups aren’t failing!

They are either happening successfully or not happening at all. However, sidekiq seems like triggering the job at right times but somehow something in between is not happy.

I’m still trying to understand what may be the potential culprit because in the last 15 days, it ran successfully only 2 times (non-consecutively).

Also, Check for updates is working fine and I’m able to update from docker manager as well as through SSH.

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [2018年六月20日 05:55 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/6 "2018-06-20T05:55:07Z")

</div>

We don’t always get a failed backup either. But the automated ones do “skip”, similar to what you’re seeing.

Anything interesting in /logs, and /sidekiq?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年六月20日 05:56 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/7 "2018-06-20T05:56:43Z")

</div>

> [@JagWaugh](#):
>
> Anything interesting in /logs, and /sidekiq?

in /logs, Only some register plugin code related warnings (which predate the issue)  
And in /sidekiq, everything seems happy (27 failed jobs which predate the issue and are related to a telegram notification plugin which was since removed)

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [2018年六月20日 05:59 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/8 "2018-06-20T05:59:03Z")

</div>

Is your sidekiq running out of memory and restarting/missing heartbeats?

That ours restarts every 30 min on the dot seems very unusual to me.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年六月20日 06:00 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/9 "2018-06-20T06:00:39Z")

</div>

> [@JagWaugh](#):
>
> sidekiq running out of memory and restarting/missing heartbeats?

I don’t think so! never had any alerts regarding that anywhere! How do you test if it is out of memory (mine has a peak of only 40 MB memory)

 ![Capture](https://global.discourse-cdn.com/meta/original/3X/3/d/3d4b7a07cb302d32ed46995a28e6b05081b77841.PNG)

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [2018年六月20日 06:06 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/10 "2018-06-20T06:06:25Z")

</div>

> [@itsbhanusharma](#):
>
> I don’t think so! never had any alerts regarding that anywhere! How do you test if it is out of memory (mine has a peak of only 40 MB memory)

/logs shows messages:

`Sidekiq is consuming too much memory (using: 2307.83M) for 'forums.jag-lovers.com', restarting`

and

`Sidekiq heartbeat test failed, restarting`

Looking at /sidekiq/scheduled you can see sidekiq working through the backlog after a missed heartbeat.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年六月20日 06:08 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/11 "2018-06-20T06:08:42Z")

</div>

Nothing as such in sidekiq

No backlog either:

 ![Capture](https://global.discourse-cdn.com/meta/original/3X/2/d/2d11d8272347f482b9ebe5545f0538f3eb013020.PNG)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年七月8日 11:38 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/12 "2018-07-08T11:38:19Z")

</div>

So I decided to give it another shot!  
Reset every setting related to backups to default

Then after the 1 week time, a backup was created.  
Then I amended settings to what we wanted (daily Back up including attachments) and it worked!

I don’t know what made it work but I’m glad whatever it was, it’s back to business.

This topic can be closed! Thanks

---

<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: [2018年七月8日 19:49 UTC](https://meta.discourse.org/t/automatic-backups-are-a-hit-or-miss/90181/13 "2018-07-08T19:49:03Z")

</div>


