Changes between Version 6 and Version 7 of TracMigratePlugin


Ignore:
Timestamp:
Feb 1, 2014, 8:05:59 AM (11 months ago)
Author:
jun66j5
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracMigratePlugin

    v6 v7  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Migrate to new environment and another database =
     3= Migrate to new environment with another database =
    44
    55== Description ==
    66
    7 The plugin provides `migrate` command which migrates to new environment and another database for `trac-admin`.
     7The plugin provides `trac-migrate.py` script and `migrate` command of `trac-admin` which migrates to new environment with another database.
    88
    99== Bugs/Feature Requests ==
     
    2323You can check out TracMigratePlugin from [http://trac-hacks.org/svn/tracmigrateplugin here] using Subversion, or [source:tracmigrateplugin browse the source] with Trac.
    2424
     25== Usage without installation ==
     26
     27 1. Checkout or export latest source.
     28{{{#!sh
     29svn co http://trac-hacks.org/svn/tracmigrateplugin/0.12 /path/to/tracmigrateplugin
     30}}}
     31 2. If new environment uses PostgreSQL or MySQL, create database for the new environment. See [t:DatabaseBackend#BackendSpecificInstallationInstructions].
     32 3. Run `trac-migrate.py`.
     33{{{#!sh
     34$ cd /path/to/tracmigrateplugin
     35$ ./trac-migrate.py /path/to/source /path/to/destination mysql://tracuser:password@localhost/trac
     36Copying tables:
     37  attachment table... 10 records.
     38  auth_cookie table... 9 records.
     39  cache table... 11 records.
     40....
     41}}}
     42
    2543== Install ==
    2644
    2745 1. Install the plugin for Trac 0.12 or later.
    28 {{{
    29 #!sh
     46{{{#!sh
    3047easy_install http://trac-hacks.org/svn/tracmigrateplugin/0.12
    3148}}}
    3249 2. Enable the plugin in trac.ini of your source environment.
    33 {{{
    34 #!ini
     50{{{#!ini
    3551[components]
    3652tracmigrate.* = enabled
     
    3955== Example ==
    4056
    41 {{{
    42 #!sh
    43 $ trac-admin /path/to/source-tracenv migrate /path/to/destination-tracenv postgres://tracuser:password@localhost/trac?schema=destination
     57{{{#!sh
     58$ ./trac-migrate.py
     59Usage: ./trac-migrate.py SOURCE-TRACENV DEST-TRACENV DBURI
     60
     61Examples:
     62  $ ./trac-migrate.py /path/to/source /path/to/dest sqlite:db/trac.db
     63  $ ./trac-migrate.py /path/to/source /path/to/dest postgres://tracuser:password@localhost/trac?schema=destination
     64  $ ./trac-migrate.py /path/to/source /path/to/dest mysql://tracuser:password@localhost/trac
     65
     66}}}
     67{{{#!sh
     68$ ./trac-migrate.py /path/to/source-tracenv migrate /path/to/destination-tracenv postgres://tracuser:password@localhost/trac?schema=destination
    4469Copying tables:
    4570  attachment table... 10 records.