Broken astdb.sqlite3

Today on of my Asterisk Servers got disconnected from power by mistake. When it came up again, the /var/lib/asterisk/astdb.sqlite3 was corrupted. Asterisk could not commit anything into the database which lead to a very unstable situation since it also could not save registration AORs an things like that.

I stopped asterisk, deleted the astdb and started it again and everything was fine again. Since I don’t use astdb for storing anything by myself I was thinking about adding a “rm -rf /var/lib/asterisk/astdb.sqlite3” to my boot sequence before asterisk starts. Just to be sure something like this won’t happen again.

Does anyone think that this could have any drawbacks?

The drawback is that while you may not store things, Asterisk does. Registered endpoints would be lost for example, as well as any pubsub subscriptions. With these lost it’s up to all the endpoints to re-register and re-subscribe on their own time frame.

1 Like

Yeah, thank you - that’s what I was thinking. In my setup I can live with that.