TeamSpeak Server on Raspberry Pi 3b + crashes. Database damaged?

Hi Guys!

I have been running a 32-bit TeamSpeak 3 server on my Raspberry Pi with Raspbian via ExaGear for almost half a year now.

But one day the server suddenly crashed and only wanted to run for a few minutes before it crashed again. I was able to fix this problem with an update.

And now again: The TeamSpeak server crashes and can no longer be started properly, crashes again after a few minutes. An update didn’t help this time either.

I suspect that something is wrong with the database, but I haven’t changed anything ?! It just crashed and now it doesn’t work anymore…

I hope someone can help me, thanks in advance!

Here is a link to an error log i recieved after trying to start the server:
https://pastebin.com/mgyFN7rt

1 Like

Your DB is done for, either load a backup or start from scratch.

From the logs your database is indeed damaged - might be worth trying to load it with sqlite and running:

PRAGMA integrity_check;

and seeing what it says.

I’m sorry, but I’m am newcomer to this topic, i dont know what to do next. What can i do to repair the database or at least save the files, where all the channels and servergroups are saved in? I sacrifieced a lot of time on making this TeamSpeak Server. And I’d really like to know, why this happened so suddenly, if this is possible to answer. Would you guys be so nice and give me a step-by-step instruction on how to check the database?

I tried to use a SQlite manager on windows to check the ts3server.sqlitedb file. After using your command it says that 35 files are faulty, from row 221 to row 254 and another one without a row.
It says: row 221 missing from index index_client_properties_serverid_id_ident until row 254
And the one without a row: wrong # of entries in index index_client_properties_serverid_id_ident

What does that mean?

At this point it’s probably easier to start again - manual database repair is a pain and unsupported. As for what happened, did your Raspberry PI crash - usually this would be a suddenly power failure and the data wasn’t written back nicely?

2 Likes

I dont think the Raspberry itself crashed, it seems like just the server failed, because the server-window was still opened when i connected to the raspberry pi desktop.

But how can I repair my database now, i’d really wanna try it because i dont want to set the server back up from scratch…

Even if you do … Lesson learned… This is why servers are not usually hosted on mSD Cards … they get corrupted. Just make a backup of the SD card/server when you set it up and wait for this to happen again :slight_smile:

I dont even know, that there is something like a mSD Card… So i should go and buy another SD Card or whatever? So there is no way to repair my corrupted server?

I wouldn’t say no way, but there’s a good chance you could do a lot of complicated manual database repairs and still have a broken server at the end - and that’s far from easy to do. I’d recommend starting again, and make backups of the new database if you can.

1 Like

What the command reported seems most likely an index corruption, you could try the solution posted here on stackoverflow: sqlite - How to recover a corrupt SQLite3 database? - Stack Overflow

This is what I see as the simple thing you can try, other than that, there is manual editing and checking for corruption that could result in a really huge waste of time.

If you are going to start from scratch, please be sure to do daily or weekly backups of your server, it is as easy as adding a line to the /etc/crontab file (on Linux) that will create a .zip archive of the specified file or folder. Here is how you do it (check also the answer): zip - Simple Cronjob to backup a directory - Stack Overflow

Hm, that solution didnt work as far as i can tell. I think I learned my lesson and from now on I will do weekly backups. I started the server for a last time to take screenshots of how i made all the channels and I’ll start from scratch now.

Thank’s to everyone for helping me!