Edgewall Software

Version 8 (modified by Ryan J Ollos, 6 years ago) ( diff )

Expand based on feedback in gmessage:trac-users:CYvLPxJ_ZT0/g56T5MdTAwAJ.


These are the steps to migrate a Subversion and Trac environment between two machines running on different Linux distributions. For svnsync, it is required to have both svn server versions ≥ 1.4.0.

Subversion Replication

  • Create a repository on the new server:
    $ svnadmin create /var/spool/raid/svn_repo
  • Make sure the commit hooks are configured to allow our 'svnsync' user to do anything it wants:
    $ echo "#!/bin/sh" > /var/spool/raid/svn_repo/hooks/pre-revprop-change
    $ chmod +x /var/spool/raid/svn_repo/hooks/pre-revprop-change
  • Set destination repo to version 0 (svnsync —opts dest_repo src_repo):
    $ svnsync --username svnsync  init file:///var/spool/raid/svn_repo/   svn+ssh://root@  
    Copied properties for revision 0.
  • Sync the repositories:
    $  svnsync --username=svnsync --non-interactive sync file:///var/spool/raid/svn_repo/
    Committed revision 1.
    Copied properties for revision 1.
    Committed revision 2.
    Copied properties for revision 2.
    Committed revision 3.
    Copied properties for revision 3.
    Committed revision 4.
    Copied properties for revision 4.
    Committed revision 5.
    Copied properties for revision 5.
    Committed revision 6.
    Copied properties for revision 6.
    Committed revision 7.

Trac Migration

  • Install a Trac project on the destination machine.
  • On the source machine, backup the environment following the steps described in TracBackup.
  • Modify the repository location, if different on the destination machine, through the web administration page (/admin/versioncontrol/repository), using TracAdmin or by directly editing trac.ini.

  • Copy the environment backup to the destination machine.
    $ scp $backup_dir root@
  • Copy the environment to the location of the project created in the first step.
  • Upgrade the environment if an upgrade is indicated to be necessary. See TracUpgrade for more information.
  • Restart tracd or your web server.
Note: See TracWiki for help on using the wiki.