Search code examples
trac

Transfer a trac database from one desktop to another


I'm using Trac 0.12.2 that came as a part of Bitnami Trac Stac.

I am very new to Trac & just started with Trac, working with a local repository on a desktop a few weeks ago & created some issues. Now I wanted to transfer the all those issues onto my new Trac installation on another desktop. So I simply tried replacing the empty(I believed) database folder of new installation with my old Trac DB folder.

Specifically this folder:

C:\BitNamiTracStack\repository\db\

When I tried doing so, the admin tab on the trac interface disappeared.

Also I got a message:

   Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information. 


How do I successfully transfer my issues from one desktop to another ?


Solution

  • Check your installation and find the correct directory called 'Trac environment' as per Remy's advice.

    While his answer is the safe road and general advice without doubt, you may still succeed with a less complete transfer, depending on what you already put into the Trac environment in question. Assuming you do use BitNami's default Trac db backend (SQLite) you'll need at least

    • the latest db named trac.db from the db folder
    • the configuration file conf/trac.ini

    If you've worked with attachments to tickets or wiki pages, the whole directory structure below attachements is needed as well.

    Other things might not have been touched by a self-declared "very new" Trac user within the first weeks. Of course a diff -Nur <path_to_old_dir> <path_to_new_dir> | <your_favorite_editor> will remind you of anything you may have already forgotten.