Search code examples
trac

Can I Copy All the Wikis From One Trac To Another?


We have an existing Trac installation for an old bunch of source code, and I'm creating a new Trac installation to support a new bunch of source code. Most of the info we've built up over time in the old Trac installation's wiki is equally relevant for the new Trac wiki.

Is there a quick way to migrate the wiki data from the old Trac to the new Trac?

Trac version = 0.10.4


Solution

  • Use trac-admin <trac-env> wiki dump <some-directory> to dump the wiki pages to a directory, then use trac-admin <new-trac-env> wiki load <some-directory> to load the wiki pages into the new environment.

    Note that I don't think this will preserve wiki page history. If you want that, you can copy the database to the new instance and do a resync to the new repository.

    I would also recommend upgrading to 0.11 if you can. 0.10 is no longer supported, and 0.12 is due out "soonish".

    Disclosure: I'm one of the Trac devs