Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caosiyang/go-mongo-sync
DEPRECATED !!! Please refer to https://github.com/caosiyang/py-mongo-sync
https://github.com/caosiyang/go-mongo-sync
Last synced: about 2 months ago
JSON representation
DEPRECATED !!! Please refer to https://github.com/caosiyang/py-mongo-sync
- Host: GitHub
- URL: https://github.com/caosiyang/go-mongo-sync
- Owner: caosiyang
- Created: 2015-05-06T13:38:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-12T12:57:32.000Z (over 8 years ago)
- Last Synced: 2023-08-01T10:11:12.851Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 29
- Watchers: 3
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-mongo-sync
An oplog based realtime sync tool for MongoDB written in Go.
Source should be a replica set and destination could be a mongod/mongos instance or member of replica set.## Feature
- initial sync including collections and indexes
- oplog based increment sync
- **concurrent oplog replaying**## Note
- the following databases are ignored: 'admin', 'local'
- collections that starts with '**system.**' are ignored, e.g.: 'system.users', 'system.profile'## Usage
# ./go-mongo-sync --help
Usage of ./go-mongo-sync:
-from="": source, a member of replica-set, value should be a hostportstr like 'host:port'
-to="": destination, a mongos or mongod instance, value should be a hostportstr like 'host:port'
-direct-connect=false: for source only, disable the automatic replica set server discovery logic and force the use of servers provided only (even if secondaries)
-ignore-index=false: not create index for collections
-oplog=false: replay oplog only
-start-optime=0: start optime, the number of seconds elapsed since January 1 1970 UTC, use this with '--oplog'
-upsert=false: upsert documents in initial sync, insert documents if not set## TODO
- support authentication for source and destination