sudo apt-get install trac
sudo trac-admin /path/to/trac upgrade
sudo trac-admin /path/to/trac repository resync '(default)'