GithubHelp home page GithubHelp logo

doytsujin / migrate_from_trac.rake Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hkato/migrate_from_trac.rake

0.0 1.0 0.0 15 KB

Redmine: migrate_from_trac.rake patch and Docker test environment

Dockerfile 0.33% Shell 2.87% Ruby 96.80%

migrate_from_trac.rake's Introduction

Redmine: migrate from Trac patch

ref. Official Redmine wiki > Migrating from other systems > Trac

  • This patch dose not work with Redmine 4.x. This is due to the difference between Rails/ActiveRecord 4.2 and 5.2.
  • Only tested with Trac 1.0.3, not tested with 1.2, 1.4.

Test environment

Related issues and patches

Migration test procedure

You can easily test your migration with Docker before you apply your production environment.

Create tar+gz archive on the Trac host

[username@trac-host ~]$ cd ${TRAC_ENV_PARENT_DIR}
[username@trac-host /var/lib/trac]$ tar cvfz myproj.tar.gz myproj

and put tar+gz archive on Redmine host

[username@trac-host /var/lib/trac]$ scp myproj.tar.gz redmine-host:/some/where/work/migrate_from_trac.rake/trac/

Create Redmine environment on Docker host

Clone this project

$ cd /some/where/work/
$ git clone https://github.com/hkato/migrate_from_trac.rake.git
$ cd migrate_from_trac.rake/

Edit .env file

$ cp .env.sample .env
$ vi .env

Run the init script (be careful: redmine and mysql containers will be destroyed)

$ ./init.sh

After this, you can access anilla Redmine with this patched.

Migrate

$ ./migrate.sh

Just exec rake redmine:migrate_from_trac RAILS_ENV="production" on the Redmine container.

The Trac data has been deployed on the /trac path on the Redmine container. you can set Trac directory [] as /trac/myproj.

WARNING: a new project will be added to Redmine during this process.
Are you sure you want to continue ? [y/N] y

Trac directory []: /trac/myproj
Trac database adapter (sqlite3, mysql2, postgresql) [sqlite3]: 
Trac database encoding [UTF-8]: 
Target project identifier []: myproj

Trac database version is: 29
Migrating components.........
Migrating milestones..........................................................................
Migrating custom fields...
Migrating tickets.................................................................................................................
Migrating wiki.............................................

Components:      9/9
Milestones:      74/74
Tickets:         1174/1174
Ticket files:    97/97
Custom values:   3522/3522
Wiki edits:      45/45
Wiki files:      0/0

Migrate from Redmine 3.x to 4.x

Stop redmine container

$ docker-compose stop redmine

Update redmine container image

$ vi docker-compose.yml
 services:
   redmine:
     container_name: ${REDMINE:-redmine}
-    build: .
+    image: redmine:4.1.1-passenger
     restart: always
     ports:
       - 80:3000

Maybe you can use these images

  • redmine:4.0.x-passenger,redmine:4.0.x
  • redmine:4.1.x-passenger,redmine:4.1.x
  • quiw/redmica:1.1.x-passenger,quiw/redmica:1.1.x

Update sqlite3 gem package compatible with Redmine 4.x

$ vi srv/redmine/Gemfile.local
 gem 'dalli'
-gem 'sqlite3', '~> 1.3.13'
+gem 'sqlite3', '~> 1.4.0'

Start new redmine container

$ docker-compose up -d redmine

migrate_from_trac.rake's People

Contributors

hkato avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.