mgosd

command module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

README

mgosd

Tiny concurrent and scheduled dump creator for MongoDB.

Current stable version: 1.1.0.

Licensed under GNU GPLv3.

Table of Contents

  1. Installation
  2. Usage

Installation

If you're on Linux, just clone this repo and then you can find Linux executable in bin/ directory.

If you're on Mac or Windows:

  1. Install Go compiler (1.12.6+)
  2. Install mgo dependency by running go get github.com/globalsign/mgo
  3. Compile mgosd by running go build main.go
  4. Done!

Usage

There are two ways of using mgosd:

  1. Configuration via CLI arguments:
$ ./mgosd -h
+----------------------------------------+
| mgosd (c) Ildar Karymov, 2019          |
| https://github.com/ildarkarymoff/mgosd |
| License: GNU GPLv3                     |
| Version: 1.1.0                         |
+----------------------------------------+
Usage of ./mgosd:
  -db string
    	Database name
  -host string
    	Database server address (default "127.0.0.1")
  -i string
    	Interval of dumping (default "12h")
  -login string
    	Database username (default "<empty>")
  -o string
    	Path to output directory (default $HOME)
  -password string
    	Database user password (default "<empty>")
  -port int
    	Database server port (default 27017)
  1. Using JSON configuration:
{
  "collections": [
    "users",
    "comments",
    "posts"
  ],
  "interval": "5s",
  "output": "dumps_test",
  "db": {
    "database": "mydb",
    "host": "localhost",
    "port": 27017
  }
}
$ ./mgosd config.json

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package mgosd provides types and main functionality of mgosd software.
Package mgosd provides types and main functionality of mgosd software.

Jump to

Keyboard shortcuts

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