Changes between Version 7 and Version 8 of TracMigratePlugin


Ignore:
Timestamp:
Feb 15, 2014, 8:10:13 AM (11 months ago)
Author:
jun66j5
Comment:

Added example for in-place migration

Legend:

Unmodified
Added
Removed
Modified
  • TracMigratePlugin

    v7 v8  
    5454
    5555== Example ==
    56 
     56=== Usage
    5757{{{#!sh
    5858$ ./trac-migrate.py
    59 Usage: ./trac-migrate.py SOURCE-TRACENV DEST-TRACENV DBURI
     59Usage: trac-migrate.py [OPTIONS] SOURCE-TRACENV [DEST-TRACENV] DBURI
     60
     61  Migrate to new environment with another database or another
     62  database without creating a new environment.
     63
     64Options:
     65  -i, --in-place    migrate without creating a new environment
    6066
    6167Examples:
    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
     68  $ trac-migrate.py /path/to/source /path/to/dest sqlite:db/trac.db
     69  $ trac-migrate.py /path/to/source /path/to/dest postgres://tracuser:password@localhost/trac?schema=destination
     70  $ trac-migrate.py /path/to/source /path/to/dest mysql://tracuser:password@localhost/trac
     71  $ trac-migrate.py --in-place /path/to/source sqlite:db/trac.db
     72  $ trac-migrate.py --in-place /path/to/source postgres://tracuser:password@localhost/trac?schema=destination
     73  $ trac-migrate.py --in-place /path/to/source mysql://tracuser:password@localhost/trac
    6574
    6675}}}
     76=== Migration to a new environment
    6777{{{#!sh
    68 $ ./trac-migrate.py /path/to/source-tracenv migrate /path/to/destination-tracenv postgres://tracuser:password@localhost/trac?schema=destination
     78$ ./trac-migrate.py /path/to/source-tracenv /path/to/destination-tracenv postgres://tracuser:password@localhost/trac?schema=destination
    6979Copying tables:
    7080  attachment table... 10 records.
     
    92102  plugins directory... done.
    93103}}}
     104=== Migration to a new database without creating a new environment
     105{{{#!sh
     106$ ./trac-migrate.py --in-place /path/to/tracenv postgres://trac:password@localhost/trac?schema=new_schema
     107Back up trac.ini to trac.ini.migrate-1392447405 in /path/to/tracenv/conf.
     108Copying tables:
     109  attachment table... 0 records.
     110  auth_cookie table... 2 records.
     111  cache table... 5 records.
     112  component table... 2 records.
     113  enum table... 13 records.
     114  milestone table... 4 records.
     115  node_change table... 58918 records.
     116  permission table... 19 records.
     117  report table... 8 records.
     118  repository table... 15 records.
     119  revision table... 13854 records.
     120  session table... 2 records.
     121  session_attribute table... 4 records.
     122  system table... 3 records.
     123  ticket table... 4 records.
     124  ticket_change table... 3 records.
     125  ticket_custom table... 0 records.
     126  version table... 2 records.
     127  wiki table... 57 records.
     128}}}
    94129
    95130== Tickets ==