connector-mongodb
所属分类:MongoDB
开发工具:GO
文件大小:16037KB
下载次数:0
上传日期:2020-10-02 02:02:53
上 传 者:
sh-1993
说明: Storj协议的MongoDB社区连接器;使用它将您的数据备份到领先的去中心化存储...
(MongoDB community connector to the Storj protocol; use this to backup your data to the leading decentralized storage network.)
文件列表:
CHANGELOG.md (1268, 2020-10-02)
Dockerfile (95, 2020-10-02)
LICENSE (11560, 2020-10-02)
cloudbuild.yaml (1008, 2020-10-02)
cmd (0, 2020-10-02)
cmd\main_test.go (1770, 2020-10-02)
cmd\mongo.go (6105, 2020-10-02)
cmd\restore.go (2788, 2020-10-02)
cmd\root.go (675, 2020-10-02)
cmd\store.go (2519, 2020-10-02)
cmd\storj.go (11206, 2020-10-02)
cmd\version.go (393, 2020-10-02)
config (0, 2020-10-02)
config\db_property.json (196, 2020-10-02)
config\storj_config.json (660, 2020-10-02)
docs (0, 2020-10-02)
docs\.nojekyll (0, 2020-10-02)
docs\_images (0, 2020-10-02)
docs\_images\arch.drawio.png (220356, 2020-10-02)
docs\_navbar.md (265, 2020-10-02)
docs\_sidebar.md (150, 2020-10-02)
docs\config-files.md (1705, 2020-10-02)
docs\index.html (834, 2020-10-02)
docs\run.md (2733, 2020-10-02)
docs\videos.md (74, 2020-10-02)
docs\videos (0, 2020-10-02)
docs\videos\mongodb.webm (17242306, 2020-10-02)
go.mod (210, 2020-10-02)
go.sum (30986, 2020-10-02)
main.go (112, 2020-10-02)
test (0, 2020-10-02)
test\doc-check.sh (290, 2020-10-02)
... ...
# connector-mongodb (uplink v1.0.5)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d637c9ce9f574fb9a1bab1a8f1960a1d)](https://app.codacy.com/gh/storj-thirdparty/connector-mongodb?utm_source=github.com&utm_medium=referral&utm_content=storj-thirdparty/connector-mongodb&utm_campaign=Badge_Grade_Dashboard)
[![Go Report Card](https://goreportcard.com/badge/github.com/storj-thirdparty/connector-mongodb)](https://goreportcard.com/report/github.com/storj-thirdparty/connector-mongodb)
![Cloud Build](https://storage.googleapis.com/storj-utropic-services-badges/builds/connector-mongodb/branches/master.svg)
## Overview
The mongoDB Connector connects to an mongoDB database, takes a backup of the specified database and uploads the backup data on Storj network. It can also restore the latest back-up of a specified database to the local storage.
```bash
Usage:
connector-mongodb [command]
Available Commands:
help Help about any command
restore Command to restore the latest back-up to the local disk
store Command to upload data to a Storj V3 network
version Prints the version of the tool
```
`store` - Connect to the specified database (default: `db_property.json`). Back-up of the database is generated using tooling provided by mongoDB and then uploaded to the Storj network. Connect to a Storj v3 network using the access specified in the Storj configuration file (default: `storj_config.json`).
Back-up data is iterated through and upload in 1 MB chunks to the Storj network.
The following flags can be used with the `store` command:
* `accesskey` - Connects to the Storj network using a serialized access key instead of an API key, satellite url and encryption passphrase.
* `share` - Generates a restricted shareable serialized access with the restrictions specified in the Storj configuration file.
`restore` - Connect to a Storj v3 network using the access specified in the Storj configuration file (default: `storj_config.json`). Latest back-up of the particular database is located and downloaded to local storage.
The following flags can be used with the `restore` command:
* `accesskey` - Connects to the Storj network using a serialized access key instead of an API key, satellite url and encryption passphrase.
* `match` - Matches to regular expression with the databases whose back-up(s) are uplaoded to Storj network and restores the latest back-up of all the matching databases. It only works with the `latest` flag.
* `latest` - Restores the latest back-up of the specified MongoDB database.
* `database` - Storj path of the database back-up to be restored. Takes only database name if used with `latest` flag.
Sample configuration files are provided in the `./config` folder.
## Requirements and Install
To build from scratch, [install the latest Go](https://golang.org/doc/install#install).
> Note: Ensure go modules are enabled (GO111MODULE=on)
### Option #1: clone this repo (most common)
To clone the repo
```
git clone https://github.com/storj-thirdparty/connector-mongodb.git
```
Then, build the project using the following:
```
cd connector-mongodb
go build
```
### Option #2: ``go get`` into your gopath
To download the project inside your GOPATH use the following command:
```
go get github.com/storj-thirdparty/connector-mongodb
```
## Run (short version)
Once you have built the project run the following commands as per your requirement:
### Get help
```
$ ./connector-mongodb --help
```
### Check version
```
$ ./connector-mongodb --version
```
### Create backup from mongoDB and upload to Storj
```
$ ./connector-mongodb store
```
### Restore latest backup from from Storj and save to local disk
```
$ ./connector-mongodb restore
```
## Documentation
* Access documentation on local system :
1) Install [docsify](https://www.npmjs.com/package/docsify-cli)
2) Run the following command at the root directory of the cloned project.
```
$ docsify serve docs
```
* For more information on runtime flags, configuration, testing, and diagrams, check out the [Detail](//github.com/storj-thirdparty/connector-mongodb/wiki) or jump to:
* [Config Files](//github.com/storj-thirdparty/connector-mongodb/wiki/#config-files)
* [Run (long version)](//github.com/storj-thirdparty/connector-mongodb/wiki/#run)
* [Testing](//github.com/storj-thirdparty/connector-mongodb/wiki/#testing)
* [Flow Diagram](//github.com/storj-thirdparty/connector-mongodb/wiki/#flow-diagram)
* [Video](//github.com/storj-thirdparty/connector-mongodb/docs/videos)
近期下载者:
相关文件:
收藏者: