How to backup and restore a Trac project

If you use Trac as your bug and progress tracking tool then you too may one day need to take a backup of it or move it to a new server like I had to the other day. Thankfully, as I discovered, it is a relatively straight forward process. Here are the steps to backup and restore a Trac project.

Take a hot backup of your existing install. This is essentially a backup from a fixed point that you can take while still using your Trac at the same time (great for having no downtime).

trac-admin [/path/to/projenv] hotcopy [/path/to/backupdir]

For example:

trac-admin /var/www/trac/projectx hotcopy /home/awesomeadmin/trac_backup/projectx

In order to restore it on another server you just need to create the project from scratch (i.e. using initenv) like this

trac-admin [targetdir] initenv

and then simply replace the install directory contents with the backed up contents. Strictly speaking I’m not even sure if you need to initenv but that’s how I did it and it worked.

Hopefully this works for you as well. Happy… err… Trac-ing?

Be the first to comment

Leave a Reply

Your email address will not be published.