1 | | = Trac Migration = |
| 1 | = Migration = |
| 2 | |
| 3 | I had to migrate a subversion and Trac enviroment between two machines; Different distributions. For svnsync, it is required to have both svn server versions >= 1.4.0 |
| 4 | |
| 5 | == Subversion Replication == |
| 6 | |
| 7 | * Create a repository on the new server |
| 8 | {{{ |
| 9 | $ svnadmin create /var/spool/raid/svn_repo |
| 10 | }}} |
| 11 | |
| 12 | * Make sure the commit hooks are configured to allow our 'svnsync' user to do anything it wants. |
| 13 | {{{ |
| 14 | $ echo "#!/bin/sh" > /var/spool/raid/svn_repo/hooks/pre-revprop-change |
| 15 | $ chmod +x /var/spool/raid/svn_repo/hooks/pre-revprop-change |
| 16 | }}} |
| 17 | |
| 18 | * Set destination repo to version 0 ('''svnsync --opts dest_repo src_repo''') |
| 19 | {{{ |
| 20 | $ svnsync --username svnsync init file:///var/spool/raid/svn_repo/ svn+ssh://root@192.168.11.128/home/repos/projects/ |
| 21 | Copied properties for revision 0. |
| 22 | }}} |
| 23 | |
| 24 | |
| 25 | * Sync the repositories |
| 26 | {{{ |
| 27 | $ svnsync --username=svnsync --non-interactive sync file:///var/spool/raid/svn_repo/ |
| 28 | Committed revision 1. |
| 29 | Copied properties for revision 1. |
| 30 | Committed revision 2. |
| 31 | Copied properties for revision 2. |
| 32 | Committed revision 3. |
| 33 | Copied properties for revision 3. |
| 34 | Committed revision 4. |
| 35 | Copied properties for revision 4. |
| 36 | Committed revision 5. |
| 37 | Copied properties for revision 5. |
| 38 | Committed revision 6. |
| 39 | Copied properties for revision 6. |
| 40 | Committed revision 7. |
| 41 | ..... |
| 42 | |
| 43 | }}} |
| 44 | * Done!!! |
| 45 | |
| 46 | == Trac Migration == |