Skip to content

Perl script to sync individual projects to another Redmine instance

Notifications You must be signed in to change notification settings

gonter/redmine-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perl script to sync individual projects to another Redmine instance.

Status

My current goal is to synchronize one isolated project, which only
has Wiki pages and attachments, from one Redmine instance to another.
In the end, this project shall only be used on the destination instance.
This is more complicated than initially assumed, but still leaves out
the rather hairy problem of migrating issues or even issue numbers and
whatever embedded in Wiki text.

  • Right now, migrating stuff that are related to users work.
  • Wiki migration seems to work now too.
  • Migrating attachments (using rsync’ed backup files) now work too.
  • Migrating watchers works.

The next step: Maybe I should reconsider the core synchronization code,
but this will have to wait until the migration job at hand is completed.

Notes

Perl

Why Perl? I’m not fluent enough in Ruby to even consider it as the
tool of choice for this problem. The script directly talks with
the MySQL databases of the Redmine instances, it basically ignores
the API.

To be improved

The project’s entry in ‘wikis’ whould be added to syncs by hand
since Redmine creates the Wiki but the script currently doesn’t
check for that, it only looks at the syncs table.

Also, the pre-configured trackers and roles need to be considered.

Redmine command line interface

experimental CLI to interact with Redmine

config file example

The default config file named “redmine.json” is searched in the directories ‘.’, $HOME/etc, $HOME/bin, $HOME or
can be specified via environment variable $REDMINE_CONFIG or the option —config=.


{
  "Redmine": {
    "protocol": "https",
    "host": "redmine.example.org/redmine",
    "key": "API-ACCESS-KEY-AS-FOUND-IN-REDMINE-XXXXX",
    "project-name": "my-project",
    "automapping" : 2
  }
}

TODOs

  • The CLI code needs a little more consideration and documentation …

About

Perl script to sync individual projects to another Redmine instance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages