Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simagix/hummingbird
MongoDB database migration
https://github.com/simagix/hummingbird
Last synced: 2 months ago
JSON representation
MongoDB database migration
- Host: GitHub
- URL: https://github.com/simagix/hummingbird
- Owner: simagix
- License: apache-2.0
- Created: 2022-02-21T00:48:08.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-26T15:12:17.000Z (almost 2 years ago)
- Last Synced: 2024-06-19T01:56:09.215Z (7 months ago)
- Language: Go
- Size: 108 KB
- Stars: 23
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The Hummingbird Project
As a result of "losing" my [MongoPush](https://www.simagix.com/2021/12/a-series-of-mongopush-events.html) source code, I rewrote it but on a smaller scale. I couldn't get much meaningful help in my previous close source project. To support many use cases is too big an effort for a person to take on, especially the oplogs streaming part which is in fact a reverse engineering of replication. I still think it is a great idea and many can benefit from it. So, here you go, an open source project. Contributions are welcome.The idea of the repository name was from the movie [The Hummingbird Project (2018)](https://en.wikipedia.org/wiki/The_Hummingbird_Project). The world can use good ideas. Birds can't fly over the ocean, not because they lack courage, but because there is no one waiting on the other side.
## Quick Start
### Configuration File Example
```bash
{
"command": "all",
"drop": true,
"source": "mongodb://user:password@[email protected]/?compressors=zstd,snappy&readPreference=secondaryPreferred",
"target": "mongodb+srv://user:[email protected]/?compressors=zstd,snappy&w=2&retryWrites=true",
"license": "Apache-2.0"
}
```### Start Migration
- Start neutrino
```bash
go run main/hummingbird.go -start configuration.json
```
- Add Additional Workers
```bash
go run main/hummingbird.go -worker configuration.json
```### Progress Monitoring
http://localhost:3629## Build
```bash
./build.sh
```## Download
```bash
./scripts/download-from-docker.sh
```## Configurations
```json
{
"block": 10000,
"command": "all|config|index|data|data-only",
"drop": false,
"includes": [
{
"namespace": "database.collection",
"filter": {},
"to": "database.collection",
"limit": 0,
"masks": ["field"],
"method": "default|hex|partial"
}
],
"license": "Apache-2.0",
"port": 3629,
"source": "mongodb://[user:XXXXXX@]host[:port][/[db][?options]]",
"spool": "./spool",
"target": "mongodb+srv://user:XXXXXX@host[/[db][?options]]",
"verbose": false,
"workers": 8,
"yes": false
}
```## License
[Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0)