HOWTO: restore a broken map.sqlite

Post Reply
User avatar
Walker
Member
Posts: 1814
Joined: Tue Oct 03, 2017 09:22
In-game: Walker
Contact:

HOWTO: restore a broken map.sqlite

by Walker » Post

if someone have problems with map.sqlite like:

Code: Select all

Failed to save block: database disk image is malformed
you can try the following:
( overwrite you existing world ... maybe make a backup first ? )

--- open a terminal

- install needed tools ( ubuntu / debian ):

Code: Select all

sudo apt install sqlite3
- open the database ( world map )

Code: Select all

sqlite3 /path/to/your/map.sqlite
eg.:

Code: Select all

sqlite3 /home/ubuntu/2b2t/.minetest/worlds/2b2t/map.sqlite
--- now we are INSIDE sqlite

- restore everythink thats not corrupted ( corrupted mapblocks will be droped )

Code: Select all

.recover
- leave sqlite

Code: Select all

.quit
Last edited by Walker on Sat Jun 12, 2021 11:17, edited 3 times in total.

User avatar
Walker
Member
Posts: 1814
Joined: Tue Oct 03, 2017 09:22
In-game: Walker
Contact:

Re: HOWTO: restore a broken map.sqlite

by Walker » Post

why did i make this ?

because i needed it too > viewtopic.php?p=396085#p396085

User avatar
Walker
Member
Posts: 1814
Joined: Tue Oct 03, 2017 09:22
In-game: Walker
Contact:

Re: HOWTO: restore a broken map.sqlite

by Walker » Post

for people how want it quick and dirty

Code: Select all

sqlite3 /path/to/old/map.sqlite ".recover"

u34

Re: HOWTO: restore a broken map.sqlite

by u34 » Post

+1
very helpful.

Mineminer
Member
Posts: 325
Joined: Mon Mar 05, 2018 04:05

Re: HOWTO: restore a broken map.sqlite

by Mineminer » Post

cHyper wrote:
Sat Jul 10, 2021 20:12
+1
very helpful.
Indeed an event something just kicks the bucket and losing those affected chunks are your only option (e.g. issues with backups, etc).

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 16 guests