Create Database on Mlab
- Select Cloud Provider as Google Cloud Platform, Plan Type as SANDBOX and clic “Continue”
- Select the region then click “Continue”
Set the database name
- Example database name:
- project-a-dev (for development)
- project-a-uat (for uat)
Click “Continue” button
- Confirm the order, Click “Submit Order”
- Your database already created
- Click your database to configure the users
- Click “Users” tab, click “Add Database User”
- Set your username add password, then click “Create”
- Backup your local data, go to “cmd”
mongodump --db YOUR_DB_NAME --excludeCollectionsWithPrefix acl_allows -o YOUR_OUTPUT_DIR
restore --host YOUR_MLAB_HOST --port YOUR_MLAB_PORT --username YOUR_MLAB_USERNAME --password YOUR_MLAB_USERNAME --db YOUR_MLAB_DB_NAME YOUR_BACKUP_DIR