|Version 7 (modified by 7 years ago) ( diff ),|
Table of Contents
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.
- 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://email@example.com/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. .....
- Install a Trac project on the destination machine.
- On the source machine, backup the environment using
trac-admin $env hotcopy $backup_dir, as described on the TracBackup page.
- 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 firstname.lastname@example.org:/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.