Migrating your database to Nodechef mongoDB without any downtime

After deploying your cluster, navigate to the Nodechef dashboard. Find your app listed under the task manager. Select DB actions and then select database import. Enter the connection string to the remote mongodb database and if available enter the connection string to the local database and click on the start migration button. You can cancel the migration at any point in time using the cancel migration button which is only displayed when a migration is currently in progress. Nodechef also provides real-time statistics and logging about the in progress database migration.

The import process creates all collections and indexes found on the remote database on this instance. The import process performs a snapshot of the remote database and continues to sync from the remote database if you provided the connection string to the local database of the remote mongod instance. The database import tool will continue to sync your database for an hour. You must finalize the migration within this time period.

The local database contains the collection oplog.rs. The import process uses a tailable cursor on this collection to sync all changes that happened while the snapshot copy was in progress. Consult with your current provider to provide the connection string to the local database if it is currently not available to you.

If you did not provide the connection string to the local database, finalization is not required. The process completes once the snapshot copy is completed. All writes to the database that happened in the process of copying the snapshot will be lost if syncing is not enabled for the migration.

Copy mongodb database - NodeChef

Realtime mongodb database copy statistics - NodeChef