# Database corrupted because of disk full - Pre-check free disk space before upgrading db schema

**URL:** <https://forum.duplicati.com/t/database-corrupted-because-of-disk-full-pre-check-free-disk-space-before-upgrading-db-schema/12336>\
**Category:** Features\
**Created:** [May 6, 2021, 11:58am UTC](https://forum.duplicati.com/t/database-corrupted-because-of-disk-full-pre-check-free-disk-space-before-upgrading-db-schema/12336 "2021-05-06T11:58:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon66874424](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/a/958977/32.png) [@anon66874424](https://forum.duplicati.com/u/anon66874424)\
**Post date:** [May 6, 2021, 11:58am UTC](https://forum.duplicati.com/t/database-corrupted-because-of-disk-full-pre-check-free-disk-space-before-upgrading-db-schema/12336/1 "2021-05-06T11:58:08Z")

</div>

Hi,

I’ve updated my Duplicati installation from 2.0.5.1-beta to 2.0.6.1-beta.I’ve got two jobs configured, the database sizes are (1,9 GByte) and (34 MByte). After the upgrade, I ran “check files”. The small job ran fine while running the large job with the big database failed, resulting in a corrupted database.

Looking closer the cause was “disk full” at the partition where /root/.config/Duplicati/\*.sqlite was stored.

* * *

My suggestion/Feature Request: Please calculate twice the sqlite DB size plus - let’s say - 5 % of the file size and check if this is free on the partition where the file is stored (“df -h”) check. If there’s not enough free disk space, warn the user and do NOT touch the sqlite database.

---

<div class="post-metadata">

**Author:** ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)\
**Post date:** [May 6, 2021, 4:52pm UTC](https://forum.duplicati.com/t/database-corrupted-because-of-disk-full-pre-check-free-disk-space-before-upgrading-db-schema/12336/2 "2021-05-06T16:52:31Z")

</div>

Good idea. I’d also like to see Duplicati clean up some of the old sqlite “backups” after a while.

---

<div class="post-metadata">

**Author:** ![ErikZ](https://forum.duplicati.com/user_avatar/forum.duplicati.com/erikz/32/6927_2.png) [@ErikZ](https://forum.duplicati.com/u/ErikZ)\
**Post date:** [May 23, 2021, 6:38pm UTC](https://forum.duplicati.com/t/database-corrupted-because-of-disk-full-pre-check-free-disk-space-before-upgrading-db-schema/12336/3 "2021-05-23T18:38:56Z")

</div>

Hi!

Is there an option to put the database on an alternative location? I’ve had an issue running Duplicati on a Synology where it “ate” the /dev/md0 partition because /root sits there. On Synology this is the partition where DSM is installed (Synology’s OS). I now “solved” the issue by running in a Docker container and externalize /data to somewhere else.
