# Uploading backup -\> not enough space on disk

**URL:** https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217
**Category:** Support
**Tags:** uploads, backups
**Created:** [May 25, 2015, 11:42am UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217 "2015-05-25T11:42:08Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![hedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hedgehog/32/107645_2.png) [@hedgehog](https://meta.discourse.org/u/hedgehog)
#### Post date: [May 25, 2015, 11:42am UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/1 "2015-05-25T11:42:08Z")

</div>

I’m trying to upload a 14.4MB backup to my VPS and get this message after 20%

[//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/3X/6/9/690beb2215180e83a5effd4b472f6095c20d65f9.jpg](https://global.discourse-cdn.com/meta/original/3X/6/9/690beb2215180e83a5effd4b472f6095c20d65f9.jpg)

this is the output of df though:

```
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ploop21283p1 11220208 2410508 8285604 23% /
none 4 0 4 0% /sys/fs/cgroup
none 104860 72 104788 1% /run
none 524288 0 524288 0% /dev/shm
none 5120 0 5120 0% /run/lock
none 524288 0 524288 0% /run/shm
none 102400 0 102400 0% /run/user

```

What could be the cause of this error?

---

<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: [May 25, 2015, 8:50pm UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/2 "2015-05-25T20:50:07Z")

</div>

I wonder if there is something wrong with your VPS since this is the second time you have reported unexplainable out of disk errors.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [May 25, 2015, 8:56pm UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/3 "2015-05-25T20:56:32Z")

</div>

Try making a backup first on that VPS, then upload the existing one.

```
  def has_enough_space_on_disk?(size)
    `df -Pk #{Rails.root}/public/backups | awk 'NR==2 {print $4 * 1024;}'`.to_i > size
  end

```

This function fails when the `public/backups` directory does not exist (making a backup creates it).  
Maybe add another check?

---

<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: [May 25, 2015, 9:11pm UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/4 "2015-05-25T21:11:28Z")

</div>

Hmm, @techapj can you repro that, is this a bug when the folder does not exist?

---

<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: [May 25, 2015, 9:27pm UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/5 "2015-05-25T21:27:37Z")

</div>

If using Discourse Docker the folder will be there.

---

<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: [May 25, 2015, 9:33pm UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/6 "2015-05-25T21:33:58Z")

</div>

Based on previous discussions I thought @hedgehog is using our official Docker install for his Discourse.. perhaps he can clarify on this point?

---

<div class="post-metadata">

### Author: ![hedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hedgehog/32/107645_2.png) [@hedgehog](https://meta.discourse.org/u/hedgehog)
#### Post date: [May 26, 2015, 8:53am UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/7 "2015-05-26T08:53:44Z")

</div>

After creating a backup and then uploading the one I want to use I get the message that it uploaded successfully but it never appears in the backup-list. Any ideas?

@codinghorror  
After trying the whole weekend I wasn’t able to get Discourse running on the pesky OVH-host so I tried pl3bs’ installation-script. I know I could pay more and get better Discourse-hosting but I’m dead set on the cheap solution just for the sake of beeing able to say “yes, it does work”.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [May 26, 2015, 10:45am UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/8 "2015-05-26T10:45:27Z")

</div>

> [@hedgehog](#):
>
> so I tried pl3bs’ installation-script.

Maybe go there for support? Since this clutters meta with all kinds of weird stuff that never happens to other people.

---

<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: [May 26, 2015, 11:42am UTC](https://meta.discourse.org/t/uploading-backup-not-enough-space-on-disk/29217/9 "2015-05-26T11:42:56Z")

</div>


