Home > Uncategorized > Trac – Fixing the SQLite DB

Trac – Fixing the SQLite DB

Thanks to http://www.otterbook.com/blog/2009/08/fixing-the-sqlite-db-for-a-trac-instance/ , I found out how to fix a Trac instance when I got the message

“DatabaseError: database disk image is malformed”

Here it is:

$ cd /path/to/trac-sqlite-db-directory # find the trac.db file
$ su www-data   # switch to the owner of the db file
$ mv trac.db trac.db.damaged
$ sqlite3 trac.db.damaged .dump|sqlite3 trac.db

Categories: Uncategorized Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.