1.0.4 • Published 3 years ago

soajs.mongo.sync v1.0.4

Weekly downloads
48
License
Apache-2.0
Repository
github
Last release
3 years ago

mongo sync

To clone in real time using mongo stream a cluster into another cluster with the option to change the database name and the collection name.

How to run it

  • Create a file similar to options.json at the root folder and set the right configuration
  • Set an environment variable to point to this file
  • run the code

here is a bash script example

export SOAJS_MONGO_SYNC_OPTIONS=./options.json

node main.js

Environment variables

ENV VariableDescriptionDefault
SOAJS_MONGO_SYNC_OPSTIME0 = turned off, 1 = start from yesterday, 2 = use time from options.json0
SOAJS_MONGO_SYNC_DEBUG0 = turned off, 1 = turned on0
SOAJS_MONGO_SYNC_OPTIONScheck options.jsonno default, required

Example

by setting SOAJS_MONGO_SYNC_OPSTIME=1 and adding copy=true in options.json, all document will be copied first and sync will start from yesterday's date

License

Copyright SOAJS All Rights Reserved.

Use of this source code is governed by an Apache license that can be found in the LICENSE file at the root of this repository.

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago