Thursday, April 10, 2008

Upgrade to Hardy Heron vs Trac and sqlite

Today I tried something which I don't really expected to work. After a direct upgrade from Dapper to Hardy, Trac stopped working:

"file is encrypted or is not a database"


There's a version conflict between the Trac database and the accessing sqlite version. The best solution I found while searching the web, was to convert the databases manually:

sudo -s
apt-get install sqlite
cd /var/your-trac-project/db
cp trac.db trac.db.orig
sqlite trac.db .dump > trac.sql
rm trac.db
sqlite3 trac.db ".read trac.sql"
chown www-data:www-data *
trac-admin .. upgrade


After that, Trac worked again.