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
/** | |
* This script will automatically sync all updates from one database to another. It is meant to be run while | |
* syncing the database using mongodump and mongorestore. | |
* | |
* Example: | |
* node livesync.js mongodb://<user>:<pass>@dbhost.com:10645/app-production \ | |
* mongodb://<user>:<pass>@dbhost.com:10499/local?authSource=app-production \ | |
* app-production \ | |
* mongodb://<user>:<pass>@newdbhost.com/app-prod | |
*/ |