life.i.think: Migrating SVN and Trac from Ubuntu Breezy to Dapper

Migrating SVN and Trac from Ubuntu Breezy to Dapper
Scribbled on August 11th. 0 comments.

There are a couple of packages that get updated when moving to dapper. This may apply to other distro upgrades as well.

Trac

Moving from Breezy to Dapper means an upgrade from sqlite2 to sqlite3. If you are using sqlite to store your trac data, you have to migrate.
sudo apt-get install sqlite sqlite3
cd /var/trac/project/db
mv trac.db trac.db2
sqlite trac.db2 .dump | sqlite3 trac.db
chown www-data:www-data trac.db (or your respective webserver's user)
rm trac.db2

I’ve written a small shell script to automate this for all your trac instances: migrate_trac.sh

SVN

You may get some errors in relation to the upgrade of the Berkely DB (most likely related to the log files). The output I got when running svnadmin recover is this:
Repository lock acquired.
Please wait; recovering the repository may take some time...
svnadmin: DB_RUNRECOVERY: Fatal error, run database recovery
svnadmin: bdb: mbs/db/log.0000000999: log file open failed: No such file or directory
svnadmin: bdb: PANIC: No such file or directory
svnadmin: bdb: DB_ENV->log_put: 999: DB_RUNRECOVERY: Fatal error, run database recovery
So if svnadmin recover isn’t working …
svnadmin list-unused-dblogs ./repository | xargs rm
svnadmin recover ./repository
If you get a message like:
svnadmin: DB_VERSION_MISMATCH: Database environment version mismatch
svnadmin: bdb: Program version 4.3 doesn't match environment version
rm ./repository/db/__db.00*
svnadmin recover ./repository

And of course, if you get permissions errors you must make sure your webserver can access the repository:

chown -R www-data:www-data ./repository
Comments

Leave a response

Comment