forked from AnatolyUss/nmig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b98a620
commit d9eda34
Showing
1 changed file
with
20 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,14 @@ from MySQL to PostgreSQL as easy and smooth as possible.</p> | |
|
||
<h3>KEY FEATURES</h3> | ||
<ul> | ||
<li> Ease of use - the only thing needed to run this app is the Node.js runtime.</li> | ||
<li> Accuracy of migration the database structure - NMIG converts | ||
MySQL data types to corresponding PostgreSQL data types, creates constraints, | ||
indexes, primary and foreign keys exactly as they were before migration.</li> | ||
|
||
<li>Ability to migrate big databases - in order to reduce RAM consumption NMIG will split each table's data into several chunks. <br /> | ||
Chunk size can be adjusted easily via configuration file.</li> | ||
<li>Ability to migrate big databases - in order to eliminate "process out of memory" issues NMIG will split each table's data into several chunks.<br>Each group of chunks will be loaded via separate worker process.</li> | ||
|
||
<li> Speed of data transfer - in order to migrate data fast NMIG uses PostgreSQL COPY protocol.</li> | ||
<li>Ability to recover migration process if disaster took place (without restarting from the beginning).</li> | ||
<li>Ease of monitoring - NMIG will provide detailed output about every step, it takes during the execution.</li> | ||
<li> | ||
Ease of configuration - all the parameters required for migration should be put in one single JSON document. | ||
|
@@ -24,7 +22,7 @@ Chunk size can be adjusted easily via configuration file.</li> | |
|
||
<h3>SYSTEM REQUIREMENTS</h3> | ||
<ul> | ||
<li> <b>Node.js 5.x.x</b></li> | ||
<li> <b>Node.js 5 or greater</b></li> | ||
</ul> | ||
|
||
<h3>USAGE</h3> | ||
|
@@ -41,33 +39,28 @@ Chunk size can be adjusted easily via configuration file.</li> | |
<li>Make sure, that username, you use in your PostgreSQL connection details, defined as superuser (usually "postgres")<br> More info: <a href="http://www.postgresql.org/docs/current/static/app-createuser.html">http://www.postgresql.org/docs/current/static/app-createuser.html</a></li> | ||
</ul> | ||
|
||
<p><b>4.</b> Go to nmig directory, install dependencies, and run the app with <code>--expose-gc</code> flag<br /> | ||
<p><b>4.</b> Go to nmig directory, install dependencies, and run the app<br /> | ||
<b>Sample:</b><br /> | ||
<pre>$ cd /path/to/nmig</pre><br /> | ||
<pre>$ npm install</pre><br /> | ||
<pre>$ node --expose-gc nmig.js</pre><br /> | ||
<pre>$ node nmig.js</pre><br /> | ||
</p> | ||
<p> | ||
| ||
<b>Remark</b>: you can increase node.js memory limit (RAM usage) using <code>--max-old-space-size</code> flag<br /> | ||
</p> | ||
<p> | ||
| ||
Following command will increase memory limit to ~2GB and run nmig | ||
<br /> <code>$ node --max-old-space-size=2048 --expose-gc nmig.js</code> | ||
|
||
<p><b>5</b> If a disaster took place during migration (for what ever reason) - simply restart the process | ||
<code>$ node nmig.js</code><br> NMIG will restart from the point it was stopped at. | ||
</p> | ||
|
||
<p><b>5.</b> At the end of migration check log files, if necessary.<br /> | ||
<p><b>6.</b> At the end of migration check log files, if necessary.<br /> | ||
Log files will be located under "logs_directory" folder in the root of the package.<br /> | ||
<b>Note:</b> "logs_directory" will be created during script execution.</p> | ||
|
||
|
||
<p><b>6.</b> In case of any remarks, misunderstandings or errors during migration,<br /> | ||
<p><b>7.</b> In case of any remarks, misunderstandings or errors during migration,<br /> | ||
please feel free to email me | ||
<a href="mailto:[email protected]?subject=NMIG">[email protected]</a></p> | ||
|
||
<h3>VERSION</h3> | ||
<p>Current version is 1.2.0<br /> | ||
<p>Current version is 2.0.0<br /> | ||
(major version . improvements . bug fixes)</p> | ||
|
||
|
||
|
@@ -85,11 +78,15 @@ Such step will save you ~25% of migration time. <br /> | |
The migration process described above without VACUUM took 58 seconds only. | ||
</p> | ||
|
||
<h3>LICENSE</h3> | ||
<p>NMIG is available under "GNU GENERAL PUBLIC LICENSE" (v. 3) <br /> | ||
<a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt.</a></p> | ||
|
||
|
||
<h3>REMARKS</h3> | ||
<p>Errors/Exceptions are not passed silently.<br /> | ||
Any error will be immediately written into the error log file.</p> | ||
|
||
<h3>KNOWN ISSUES</h3> | ||
<ul> | ||
<li>Empty strings in char/varchar columns may be interpreted as NULL.</li> | ||
</ul> | ||
|
||
<h3>LICENSE</h3> | ||
<p>NMIG is available under "GNU GENERAL PUBLIC LICENSE" (v. 3) <br /> | ||
<a href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt.</a></p> |