restore

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Possible added in v0.4.0

func Possible(i *MongoRestoreInput, logger *logrus.Logger) bool

Types

type MongoRestore

type MongoRestore struct {
	*MongoRestoreInput
	// contains filtered or unexported fields
}

func NewMongoRestore

func NewMongoRestore(i *MongoRestoreInput, logger *logrus.Logger) (*MongoRestore, error)

func (*MongoRestore) LastError

func (mr *MongoRestore) LastError() error

func (*MongoRestore) Start

func (mr *MongoRestore) Start() error

func (*MongoRestore) Stop

func (mr *MongoRestore) Stop() error

func (*MongoRestore) Wait

func (mr *MongoRestore) Wait() error

type MongoRestoreInput

type MongoRestoreInput struct {
	Archive  string
	Host     string
	Port     string
	Username string
	Password string
	AuthDB   string
	Threads  int
	DryRun   bool // Used only for testing
	// There is an error in MongoDB/MongoRestore when trying to restore the config servers.
	// Mongo Restore throws:  cannot drop config.version document while in --configsvr mode"
	// See: https://jira.mongodb.org/browse/SERVER-28796
	DropCollections bool
	// This field is not StopOnError as we should send it to MongoRestore, because the default
	// we want is true so, just to prevent forgetting setting it on the struct, we are going to
	// use the opposite.
	PreserveUUID      bool
	IgnoreErrors      bool
	Gzip              bool
	Oplog             bool
	SkipUsersAndRoles bool

	Reader io.ReadCloser
}

Jump to

Keyboard shortcuts

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