Difference between revisions of "Migrate Notes from MySQL database"

From Opentaps Wiki
Jump to navigationJump to search
(New page: == Migrate notes from MySQL database === Opentaps2 build produces special command-line utility notesconv.jar that can be found in modules/notes/notesconv/target. You can transfer your not...)
(No difference)

Revision as of 09:19, 30 July 2012

Migrate notes from MySQL database =

Opentaps2 build produces special command-line utility notesconv.jar that can be found in modules/notes/notesconv/target. You can transfer your notes to Mongo database with it in a minute. Use --help to get usage info.

xxx:~/git/opentaps-2/modules/notes/notesconv/target$ java -jar notesconv.jar --help
usage: java -jar notesconv.jar [-d] [-h] [-m <arg>] [-p <arg>] [-s <arg>]
       [-u <arg>]
 -d,--dry-run          Output to the screen w/o modifying MongoDB
 -h,--help             Print available options
 -m,--mongo <arg>      Mongo URI. Default: mongodb://localhost
 -p,--password <arg>   A password to access source database
 -s,--source <arg>     Source database URL in JDBC format
 -u,--username <arg>   An username to access source database

With default settings and databases running on local computer the command line would be as the following:

  java -jar notesconv.jar -s jdbc:mysql://127.0.0.1/opentaps2 -u opentaps -p opentaps

Use --dry-run to test.