Changes between Version 11 and Version 12 of TracMigratePlugin


Ignore:
Timestamp:
Mar 13, 2015, 9:14:17 AM (9 years ago)
Author:
figaro
Comment:

Further cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracMigratePlugin

    v11 v12  
    55== Description
    66
    7 The plugin provides `trac-migrate.py` script and `migrate` command of `trac-admin` which migrates to a new Trac environment with another database.
     7The plugin provides `trac-migrate.py` script and the `migrate` command of `trac-admin` which migrates to a new Trac environment with another database.
    88
    99== Bugs/Feature Requests
     
    2727== Usage without installation
    2828
    29  1. Checkout or export latest source.
     29 1. Checkout or export latest source:
    3030{{{#!sh
    3131svn co http://trac-hacks.org/svn/tracmigrateplugin/0.12 /path/to/tracmigrateplugin
    3232}}}
    33  2. If new environment uses PostgreSQL or MySQL, create database for the new environment. See [t:DatabaseBackend#BackendSpecificInstallationInstructions].
    34  3. Run `trac-migrate.py`.
     33 2. If the new environment uses PostgreSQL or MySQL, create database for this new environment. See: [t:DatabaseBackend#BackendSpecificInstallationInstructions].
     34 3. Run `trac-migrate.py`:
    3535{{{#!sh
    3636cd /path/to/tracmigrateplugin
    3737./trac-migrate.py /path/to/source /path/to/destination mysql://tracuser:password@localhost/trac
     38}}}
     39 This would result in:
     40{{{#!sh
    3841Copying tables:
    3942  attachment table... 10 records.
     
    4548== Installation
    4649
    47  1. Install the plugin for Trac 0.12 or later.
     50 1. Install the plugin for Trac 0.12 or later:
    4851{{{#!sh
    4952easy_install http://trac-hacks.org/svn/tracmigrateplugin/0.12
    5053}}}
    51  2. Enable the plugin in trac.ini of your source environment.
     54 2. Enable the plugin in `trac.ini` of your source environment:
    5255{{{#!ini
    5356[components]
     
    5558}}}
    5659
    57 == Example
     60== Examples
    5861
    5962=== Usage
     
    6164{{{#!sh
    6265$ ./trac-migrate.py
     66
    6367Usage: trac-migrate.py [OPTIONS] SOURCE-TRACENV [DEST-TRACENV] DBURI
    6468
     
    6872Options:
    6973  -i, --in-place    migrate without creating a new environment
     74}}}
    7075
    7176Examples:
    72   $ trac-migrate.py /path/to/source /path/to/dest sqlite:db/trac.db
    73   $ trac-migrate.py /path/to/source /path/to/dest postgres://tracuser:password@localhost/trac?schema=destination
    74   $ trac-migrate.py /path/to/source /path/to/dest mysql://tracuser:password@localhost/trac
    75   $ trac-migrate.py --in-place /path/to/source sqlite:db/trac.db
    76   $ trac-migrate.py --in-place /path/to/source postgres://tracuser:password@localhost/trac?schema=destination
    77   $ trac-migrate.py --in-place /path/to/source mysql://tracuser:password@localhost/trac
    78 
     77{{{
     78trac-migrate.py /path/to/source /path/to/dest sqlite:db/trac.db
     79trac-migrate.py /path/to/source /path/to/dest postgres://tracuser:password@localhost/trac?schema=destination
     80trac-migrate.py /path/to/source /path/to/dest mysql://tracuser:password@localhost/trac
     81trac-migrate.py --in-place /path/to/source sqlite:db/trac.db
     82trac-migrate.py --in-place /path/to/source postgres://tracuser:password@localhost/trac?schema=destination
     83trac-migrate.py --in-place /path/to/source mysql://tracuser:password@localhost/trac
    7984}}}
    8085
    8186=== Migration to a new environment
    8287
     88The syntax for migrating to a new environment would be as follows:
     89
    8390{{{#!sh
    8491$ ./trac-migrate.py /path/to/source-tracenv /path/to/destination-tracenv postgres://tracuser:password@localhost/trac?schema=destination
     92
    8593Copying tables:
    8694  attachment table... 10 records.
     
    111119=== Migration to a new database without creating a new environment
    112120
     121The syntax for migrating to a new database without creating a new environment would be as follows:
     122
    113123{{{#!sh
    114124$ ./trac-migrate.py --in-place /path/to/tracenv postgres://trac:password@localhost/trac?schema=new_schema
     125
    115126Copying tables:
    116127  attachment table... 31 records.