Database backends

From Minetest Wiki
Revision as of 20:52, 16 April 2014 by PilzAdam (talk | contribs) (Add Dummy DB)
Jump to navigation Jump to search

Minetest supports serveral database backends. This page provides a comparison of all three backends.

The database backend is set using the backend setting in world.mt.

If you want to migrate a world to a new backend use minetestserver --migrate [name of new backend] --world [path to your world directory]

Comparison table

Backend Speed Reliability Compatibility with builds
SQLite3

Acceptable

Acceptable (db can corrupt if accessed while open)

Very good (supported by any Minetest version)

LevelDB

Good

Good

Usually supported

Redis

Very good (data always kept in RAM)

Good

None (needs redis server)

Dummy

Very good (data always kept in RAM)

None (nothing is actually saved)

None (nothing is actually saved)

SQLite3

SQLite3 is the default backend for all Minetest worlds, it is supported by every Minetest builds and is therefore the standard database format that is used to distribute worlds.

LevelDB

LevelDB is mostly used on servers because of it's improved reliability and the ability to use more than 4GB space.

Redis

Redis support was added to Minetest in April 2014, redis is mainly useful for servers as it allows multiple worlds to be stored in one redis instance:

world.mt settings for redis

redis_address -- The IP or hostname of the redis server.

redis_port -- The port of the redis server. Optional, default: 6379

redis_hash -- Hash where the MapBlocks are stored in, if you want multiple worlds in one redis instance this needs to be different for each world.

Dummy

A dummy database backend.