Migrate Notes from MySQL database

From Opentaps Wiki
Revision as of 09:19, 30 July 2012 by Oandreyev (talk | contribs) (Protected "Migrate Notes from MySQL database": Sysop page [edit=sysop:move=sysop])
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.