# Corrupt Database error

**URL:** <https://forums.ankiweb.net/t/corrupt-database-error/38247>\
**Category:** Help\
**Created:** [December 11, 2023, 1:17am UTC](https://forums.ankiweb.net/t/corrupt-database-error/38247 "2023-12-11T01:17:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smadams](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smadams](https://forums.ankiweb.net/u/Smadams)\
**Post date:** [December 11, 2023, 1:17am UTC](https://forums.ankiweb.net/t/corrupt-database-error/38247/1 "2023-12-11T01:17:55Z")

</div>

Hi,

I recently force-restarted my Mac with the Anki app open, and I haven’t been able to work the app since. The error I see is below:

**DbError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended\_code: 11 }, Some("database disk image is malformed"))”, kind: Other }**

I have tried deleting and re-installing Anki itself as well as all of its supporting files that I could find. Any advice? Thank you!

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [December 11, 2023, 1:34am UTC](https://forums.ankiweb.net/t/corrupt-database-error/38247/2 "2023-12-11T01:34:01Z")

</div>

Your collection appears to have been corrupted. Please try restoring from an automatic backup. [Restoring an Automatic Backup (Recovering from Data Loss) - Frequently Asked Questions](https://faqs.ankiweb.net/restoring-an-automatic-backup-recovering-from-data-loss.html)

---

<div class="post-metadata">

**Author:** ![Smadams](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smadams](https://forums.ankiweb.net/u/Smadams)\
**Post date:** [December 11, 2023, 3:30am UTC](https://forums.ankiweb.net/t/corrupt-database-error/38247/3 "2023-12-11T03:30:29Z")

</div>

I have also tried to restore from a backup but I unfortunately cannot “Switch Profile” because it tries to backup my current profile first but then I am just stuck on a “Backing up…” popup that never goes away.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [December 12, 2023, 2:57am UTC](https://forums.ankiweb.net/t/corrupt-database-error/38247/4 "2023-12-12T02:57:40Z")

</div>

If you manually rename the collection.anki2 file in your profile folder while Anki is closed, you should be able to open the profile (it will open up empty), and then opening a backup should work.

[https://docs.ankiweb.net/files.html#file-locations](https://docs.ankiweb.net/files.html#file-locations)

---

<div class="post-metadata">

**Author:** ![Smadams](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smadams](https://forums.ankiweb.net/u/Smadams)\
**Post date:** [December 13, 2023, 1:38am UTC](https://forums.ankiweb.net/t/corrupt-database-error/38247/5 "2023-12-13T01:38:58Z")

</div>

That worked! thank you so much!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [January 12, 2024, 1:39am UTC](https://forums.ankiweb.net/t/corrupt-database-error/38247/6 "2024-01-12T01:39:11Z")

</div>

Closed on January 12, 2024, 1:39am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
