Skip to content

Instantly share code, notes, and snippets.

@Lazhari
Created July 16, 2017 03:12
Show Gist options
  • Save Lazhari/49c58c477d66124ca9b20a8240f7ac29 to your computer and use it in GitHub Desktop.
Save Lazhari/49c58c477d66124ca9b20a8240f7ac29 to your computer and use it in GitHub Desktop.
Installing mongify on Ubuntu 16.04 server

Installing mongify on Ubuntu 16.04 server

  1. Install Ruby dev
$ sudo apt-get install ruby-dev
  1. Install dependencies
sudo apt-get install libxml2-dev git curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
  1. Install Mysql
$ sudo apt-get install libmysqlclient-dev
$ sudo gem install mysql
  1. Install mongify
$ sudo gem install mongify
  1. Create Config file
sql_connection do
  adapter   "mysql"
  host      "localhost"
  username  "<Username>"
  password  "<Password>"
  database  "<DBName>"
  batch_size  1000000000 # This is defaulted to 10000 but in case you want to make that smaller (on lower RAM machines)
  encoding  "utf8"
end

mongodb_connection do
  host      "localhost"
  database  "<DBName>"
  username  "<Username>"
  password  "<Password>"
  encoding  "utf8"
end
  1. Check Config
$ mongify check database.config
  1. Generate Translation
mongify translation database.config > translation.rb
  1. Process
$ mongify process database.config translation.rb
@MOHAMMAD-FATHA
Copy link

Hey,

I have some concern regarding mongify I hope you can help me in this regard, just I need some clarification on the below mentioned questions:
1 . How to ensure the data is not corrupted while migrating ?
2. data types conversion from sql to mongo
3 . Check what permissions are required for Mongify to work ?For example, the environment in the Bank is restricted
4 . What is “check” doing ? (Mean it only checks the connection or checks the schema also)
5 . How is Mongify working ? What is the mechanism ?
6 . Constraints – if any for mongify – like linux / ubuntu / versions.

Kindly help me
Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment