How do you delete data from the sqlite map.db?

User avatar
lightonflux
Member
 
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof

How do you delete data from the sqlite map.db?

by lightonflux » Mon Sep 12, 2016 16:14

Hi there,

on a server we have the problem that the map grows to big. So we would like to remove everything above 1k and below 1k or so.

How does the query has to look? SQL, CLI or simple python are things i can understand. :)

I am a bit confused about the structure as in one of my map.dbs it just one table blocks with two columns "pos" and "data".
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: How do you delete data from the sqlite map.db?

by taikedz » Mon Sep 12, 2016 16:52

Is the problem that the database file is too big really? Or is it that you are running out of space on the server, and maybe you have too many uncompressed log files, or other files elsewhere?

Manually editing a database is a recipe for pain in most applications, and dropping core data should not really be the first course of action to resolve a problem.....!
 

User avatar
Naj
Member
 
Posts: 170
Joined: Sat Sep 19, 2015 21:14
GitHub: pyrollo
In-game: naj

Re: How do you delete data from the sqlite map.db?

by Naj » Tue Sep 13, 2016 10:01

Maybe you'll find some useful information there : viewtopic.php?f=3&t=9774
 

User avatar
benrob0329
Member
 
Posts: 1192
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
In-game: benrob03

Re: How do you delete data from the sqlite map.db?

by benrob0329 » Fri Sep 16, 2016 14:31

Python 3 has a built in SqlIte library, you could use interactive mode and edit it.

I potentially could try to write a script, though I don't really know SQL (I don't think its difficult)
 

User avatar
lightonflux
Member
 
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof

Re: How do you delete data from the sqlite map.db?

by lightonflux » Sat Sep 17, 2016 12:56

taikedz wrote:Is the problem that the database file is too big really?


It is 24GB big.
 

User avatar
lightonflux
Member
 
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof

Re: How do you delete data from the sqlite map.db?

by lightonflux » Sat Sep 17, 2016 12:58

Naj wrote:Maybe you'll find some useful information there : viewtopic.php?f=3&t=9774


Thanks a lot!
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 18 guests

cron