# バックアップが重複しており、ディスクに保持する数が無視されています

**URL:** https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427
**Category:** Self-hosting
**Created:** [2019 年 1 月 24 日午後 3:30 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427 "2019-01-24T15:30:54Z")
**Posts on this page:** 9
**Page:** 4

<div class="post-metadata">

### Author: ![clay](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clay/32/102156_2.png) [@clay](https://meta.discourse.org/u/clay)
#### Post date: [2019 年 2 月 10 日午後 5:48 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/65 "2019-02-10T17:48:46Z")

</div>

I, for one, think we should use sidereal time, but I don’t really care when the backups happen… I am more interested in rooting out the cause of the failures and reducing their size (if that’s related).

---

<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: [2019 年 2 月 10 日午後 5:53 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/66 "2019-02-10T17:53:13Z")

</div>

Right, and one way you do that is by _removing variables_. Such as discrepancies in time zone settings on a server.. since servers should always be in UTC time, like God intended 😉

---

<div class="post-metadata">

### Author: ![Wingtip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wingtip/32/102039_2.png) [@Wingtip](https://meta.discourse.org/u/Wingtip)
#### Post date: [2019 年 2 月 10 日午後 6:03 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/67 "2019-02-10T18:03:23Z")

</div>

I changed the host to UTC and rebooted, everything is back up and seems fine. Now lets see if we still have weird backups!

Thanks again for the support, appreciate it immensely!

---

<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: [2019 年 2 月 10 日午後 8:43 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/68 "2019-02-10T20:43:04Z")

</div>

Since you have so many images and clearly this bloats uploads somewhat, even after we trim it, have you considered moving uploads to S3 and fronting with a CDN? It will heavily reduce backup size

---

<div class="post-metadata">

### Author: ![Wingtip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wingtip/32/102039_2.png) [@Wingtip](https://meta.discourse.org/u/Wingtip)
#### Post date: [2019 年 2 月 10 日午後 10:15 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/69 "2019-02-10T22:15:45Z")

</div>

Backups are very cheap going to glacier and we have tons of transfer available at our current host, but I’ll leave the amazon price calcs to my man @clay. Certainly an option.

---

<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: [2019 年 2 月 14 日午前 1:07 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/89 "2019-02-14T01:07:47Z")

</div>

Before, pause duration **47** seconds

```
[2019-02-12 10:48:59] Pausing sidekiq...
[2019-02-12 10:49:46] Unpausing sidekiq...

```

After, pause duration **15** seconds

```
[2019-02-14 00:48:20] Pausing sidekiq...
[2019-02-14 00:48:35] Unpausing sidekiq...

```

That’s a **3x improvement** in reduced sidekiq pause time. Obviously the larger the number of the uploads, the bigger the difference will be. This is a pretty fast and beefy machine too.

As for the new site setting `include thumbnails in backups`

Before, archive time **30** seconds, 1.1 GB size

```
[2019-02-12 10:49:16] Gzipping archive, this may take a while...
[2019-02-12 10:49:46] (archiving complete)

```

After, archive time **20** seconds, 789 MB size

```
[2019-02-14 01:05:03] Gzipping archive, this may take a while...
[2019-02-14 01:05:23] Uploading archive...

```

I give this a 👍 @gerhard

@Wingtip you should get latest, rebuild, turn OFF `include thumbnails in backups` and give it a shot.

---

<div class="post-metadata">

### Author: ![Wingtip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wingtip/32/102039_2.png) [@Wingtip](https://meta.discourse.org/u/Wingtip)
#### Post date: [2019 年 2 月 14 日午前 1:11 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/90 "2019-02-14T01:11:22Z")

</div>

Will do, thank you very much!

---

<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: [2019 年 2 月 14 日午前 1:14 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/91 "2019-02-14T01:14:09Z")

</div>

No problem, thanks for digging into this so we could fix the root cause for everyone. Large database sites are particularly helpful because they strain different parts of the code etc.

---

<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: [2019 年 2 月 15 日午後 9:49 UTC](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427/92 "2019-02-15T21:49:47Z")

</div>



[Previous page](https://meta.discourse.org/t/backups-are-duplicating-and-not-respecting-number-to-keep-on-disk/107427.md?page=3)
