1. Home
  2. Framework
  3. Repair Snapt SQLite DB

Repair Snapt SQLite DB

Snapt uses two SQLite databases – one which is for Snapt information and one that is for logging data.

These may be marked as “crashed” in the case that you lose power while writing or if something else goes wrong.

The databases are located in “db/ – typically “/srv/www/htdocs/db/” or “/usr/local/snapt/program/db/”. The databases in these directories are called “log.db” and “snapt.db”.

You can repair them by running the following command ( the example is for log.db) –

mv log.db log-broken.db
echo ".dump" | sqlite3 log-broken.db | sqlite3 log.db
mv waf.db waf-broken.db
echo ".dump" | sqlite3 waf-broken.db | sqlite3 waf.db
mv snapt.db snapt-broken.db
echo ".dump" | sqlite3 snapt-broken.db | sqlite3 snapt.db
chmod 777 log.db waf.db snapt.db

After you have run the command you should now be able to login to your Snapt interface.

If this does not solve the problem please restore a backup, or log a ticket at:  support.snapt.net

Updated on November 27, 2018

Was this article helpful?

Related Articles