How do I move player files into a database?

Post Reply
BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

How do I move player files into a database?

by BBmine » Post

Hi, my servers have their player files as actual files. How can I put them in a database?

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: How do I move player files into a database?

by ExeterDad » Post

From the minetest --help command:
--migrate-players <value> Migrate from current players backend to another (Only works when using minetestserver or with --server)
So start the server with: minetestserver --migrate-players sqlite if you are using a sqlite database.
I don't remember if:
player_backend = sqlite3
is added automatically to the world.mt file or if you need to add it. I'm thinking I added it when I migrated.

Be warned though. Editing player data once it's in the database is no longer trivial. You'll have to learn to use the database in command line mode or have some nice scripts.

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: How do I move player files into a database?

by BBmine » Post

ExeterDad wrote:From the minetest --help command:
--migrate-players <value> Migrate from current players backend to another (Only works when using minetestserver or with --server)
So start the server with: minetestserver --migrate-players sqlite if you are using a sqlite database.
I don't remember if:
player_backend = sqlite3
is added automatically to the world.mt file or if you need to add it. I'm thinking I added it when I migrated.

Be warned though. Editing player data once it's in the database is no longer trivial. You'll have to learn to use the database in command line mode or have some nice scripts.
Be advised I've messed around with mysql commands. It's probably not that bad :D

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: How do I move player files into a database?

by maikerumine » Post

How exactly to I migrate all the player files into the sqlite3 file? Can I do this in game as admin?
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: How do I move player files into a database?

by maikerumine » Post

Is there documentation on how to do this?
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: How do I move player files into a database?

by rubenwardy » Post

maikerumine wrote:Is there documentation on how to do this?

./path/to/minetest --server --worldpath path/to/world --migrate-players sqlite
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: How do I move player files into a database?

by maikerumine » Post

rubenwardy wrote:
maikerumine wrote:Is there documentation on how to do this?

./path/to/minetest --server --worldpath path/to/world --migrate-players sqlite
I originally tried this in both my auto restart and by itself but still no result.
Does it matter that I am running the server on a windows machine?
Do I need any other sqlite program added to my machine?
the path to world name that works for me is: --worldname , not --worldpath, is this a typo?

Sorry for all the questions, I just cannot get this to work.

Code: Select all

-------------
  Separator
-------------

2017-10-15 09:17:45: [Main]: Using world specified by --worldname on the command line
2017-10-15 09:17:45: ERROR[Main]: An error occured during migration: Database backend sqlite not supported.

WAIT!! I think it worked: --server --worldname SAS --migrate-players sqlite3

then i changed my world.mt file to accept sqlite3 instead of files.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 22 guests