migrate from postgres to sqlite3

Post Reply
malah
New member
Posts: 4
Joined: Tue Jan 08, 2019 22:29

migrate from postgres to sqlite3

by malah » Post

I have a world with the map in postgres, I've been trying to convert it to a sqlite3 backend

I've been running this:

Code: Select all

minetestserver --migrate sqlite3 --world "/dir/to/world"
2020-05-08 09:29:09: ACTION[Main]: Successfully migrated 490677 blocks
2020-05-08 09:29:09: ACTION[Main]: world.mt updated
du -hs map.sqlite
12k map.sqlite
While it is migrating

Code: Select all

12K	map.sqlite
12K	map.sqlite-journal
verbose mode

Code: Select all

minetestserver --verbose --migrate sqlite3 --world "/dir/to/world"
2020-05-08 09:36:43: INFO[Main]: Using relative paths (RUN_IN_PLACE)
2020-05-08 09:36:43: INFO[Main]: Detected share path: /minetest/bin/..
2020-05-08 09:36:43: INFO[Main]: Detected user path: /minetest/bin/..
2020-05-08 09:36:43: INFO[Main]: Detected cache path: /minetest/bin/../cache
2020-05-08 09:36:43: INFO[Main]: minetest with SER_FMT_VER_HIGHEST_READ=28, BUILD_TYPE=Release
2020-05-08 09:36:43: INFO[Main]: RUN_IN_PLACE=1
2020-05-08 09:36:43: INFO[Main]: USE_GETTEXT=1
2020-05-08 09:36:43: INFO[Main]: USE_SOUND=0
2020-05-08 09:36:43: INFO[Main]: USE_CURL=1
2020-05-08 09:36:43: INFO[Main]: USE_FREETYPE=1
2020-05-08 09:36:43: INFO[Main]: USE_LUAJIT=1
2020-05-08 09:36:43: INFO[Main]: STATIC_SHAREDIR="."
2020-05-08 09:36:43: VERBOSE[Main]: httpfetch_init: parallel_limit=8
2020-05-08 09:36:43: INFO[Main]: Message locale is now set to: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;LC_TELEPHONE=en_US.UTF-8;LC_MEASUREME
2020-05-08 09:36:43: INFO[Main]: NT=en_US.UTF-8;LC_IDENTIFICATION=en_US.UTF-8
2020-05-08 09:36:43: VERBOSE[Main]: Determining gameid/gamespec
2020-05-08 09:36:43: INFO[Main]: Using world gameid [minetest]
2020-05-08 09:36:43: INFO[Main]: Using commanded world path [/dir/to/world]
2020-05-08 09:36:43: VERBOSE[Main]: Using world path [/dir/to/world]
2020-05-08 09:36:43: VERBOSE[Main]: Using gameid [minetest]
2020-05-08 09:36:43: INFO[Main]: PostgreSQL Database: Version 90617 Connection made.
2020-05-08 09:36:43: INFO[Main]: PostgreSQL: Map Database was initialized.
2020-05-08 09:36:44: VERBOSE[Main]: ServerMap: SQLite3 database opened.
 Migrated 136170 blocks, 27.7515% completed.
Each time I join, it's a new world that looks untouched. The 12k size makes me think that it doesn't have the 300M contents the postgres database has..
Not sure what I am doing wrong as it looks like it succeeds.

Bastrabun
Member
Posts: 212
Joined: Mon Nov 04, 2019 19:48

Re: migrate from postgres to sqlite3

by Bastrabun » Post

I had the same problem, looks like there was a bug. It was reported here: https://github.com/minetest/minetest/issues/9670

And fixed here: https://github.com/minetest/minetest/co ... 75eb36b45a

In the meantime until the new version is released, you can take the fix, compile and - at least for me - it worked. I was able to export postgresql to sqlite3 afterwards.
Whatever I say is CC0

malah
New member
Posts: 4
Joined: Tue Jan 08, 2019 22:29

Re: migrate from postgres to sqlite3

by malah » Post

wow, i figured I was messing something up so it didn't occur to look it up as a issue.
Thanks for the help!

User avatar
uwu
Member
Posts: 43
Joined: Sun Jan 21, 2018 15:01

Re: migrate from postgres to sqlite3

by uwu » Post

Would you mind sharing why wou migrated from Postgres back to SQLite?

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests