mongosync

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 11 Imported by: 0

README

mongosync

go install github.com/ringsaturn/mongosync

mongosync -SourceDB foo -SourceCollection bar1 -TargetDB foo -TargetCollection bar2
Usage of mongosync:
  -BatchSize int
        batch size (default 20)
  -InChanSize int
        in chan buffer size (default 2000)
  -LastOIDHex string
        from which moid (default "000000000000000000000000")
  -OutChanSize int
        out chan buffer size (default 2000)
  -ReadSpeed int
        read QPS (default 500)
  -SourceCollection string
        which collection data come from
  -SourceDB string
        which database data come from
  -SourceURI string
        which instance data come from (default "mongodb://localhost:27017")
  -TargetCollection string
        which collection data come from
  -TargetDB string
        which database data come from
  -TargetURI string
        which instance data come from (default "mongodb://localhost:27017")
  -Workers int
        how many workers (default 10)
  -WriteSpeed int
        write QPS (default 100)

Documentation

Overview

MongoSync is tool for sync data between Mongo instances.

Features:

  • Limit read&write QPS
  • Use `InsertMany` to BulkWrite
  • Single small binary

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL