Edgewall Software

Changes between Version 3 and Version 4 of TracMigrate


Ignore:
Timestamp:
Feb 22, 2015, 1:08:53 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracMigrate

    v3 v4  
    1 = Migration =
     1= Migration
     2
    23[[TracGuideToc]]
    34
    4 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
     5I had 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.
    56
    6 == Subversion Replication ==
     7== Subversion Replication
    78
    8  * Create a repository on the new server
     9 * Create a repository on the new server:
    910{{{
    1011$ svnadmin create /var/spool/raid/svn_repo
    1112}}}
    1213
    13  * Make sure the commit hooks are configured to allow our 'svnsync' user to do anything it wants.
     14 * Make sure the commit hooks are configured to allow our 'svnsync' user to do anything it wants:
    1415{{{
    1516$ echo "#!/bin/sh" > /var/spool/raid/svn_repo/hooks/pre-revprop-change
     
    1718}}}
    1819
    19  * Set destination repo to version 0 ('''svnsync --opts dest_repo src_repo''')
     20 * Set destination repo to version 0 ('''svnsync --opts dest_repo src_repo'''):
    2021{{{
    2122$  svnsync --username svnsync  init file:///var/spool/raid/svn_repo/   svn+ssh://root@192.168.11.128/home/repos/projects/ 
     
    2324}}}
    2425
    25 
    26  * Sync the repositories
     26 * Sync the repositories:
    2727{{{
    2828$  svnsync --username=svnsync --non-interactive sync file:///var/spool/raid/svn_repo/
     
    4343
    4444}}}
    45  *  Done!!!
    4645
    47 == Trac Migration ==
     46== Trac Migration
    4847
     48 * Install a Trac environment on the destination machine.
    4949
    50  * Install a Trac enviroment on the destination machine
    51 
    52  * On the source machine,  dump the sqlite db:
     50 * On the source machine, dump the SQLite database:
    5351{{{
    5452$ sqlite3 /path/to/trac/db/trac.db ".dump" >> sqlite_trac.sql
    5553}}}
    5654
    57  * Adjust the system table ('''sqlite_trac.sql''') to fix the repository_dir if it's different in the destination machine
     55 * Adjust the system table ('''sqlite_trac.sql''') to fix the repository_dir if it is different on the destination machine:
    5856{{{
    5957 INSERT INTO "system" VALUES('repository_dir', 'svn:fc784ba1-7bb2-4f0b-9d6b-749d55304f83:/var/spool/raid/svn_repo');
    6058}}}
    6159 
    62  * Copy the db script to the destination machine
     60 * Copy the db script to the destination machine:
    6361{{{
    6462$ scp sqlite_trac.sql root@192.168.11.125:/root/
    6563}}}
    6664
    67  * Import the script into a db and copy it to the relevant folder
     65 * Import the script into a database and copy it to the relevant folder:
    6866{{{
    6967$ cat sqlite_trac.sql | sqlite3  trac.db
     
    7270}}}
    7371
    74  * Migrate any attachments that may exist
     72 * Migrate any attachments that may exist:
    7573{{{
    7674$ scp  /home/trac/attachments/wiki root@192.168.11.125:/var/spool/raid/trac/attachments/
     
    7876}}}
    7977
    80  * Restart tracd or apache and have fun
     78 * Restart tracd or Apache.