Edgewall Software

Migration

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 —init dest_repo src_repo):
    $ svnsync --username=svnsync init file:///var/spool/raid/svn_repo/   svn+ssh://root@192.168.11.128/home/repos/projects/  
    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.
    .....
    

Note that it's possible to replicate just a subtree of your source repository.

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@192.168.11.125:/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.
Last modified 4 years ago Last modified on Mar 24, 2021, 9:59:05 AM
Note: See TracWiki for help on using the wiki.