hotbackup

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrMsgUnsupportedEngine = "This engine doesn't support hot backup."
)

Variables

View Source
var (
	ErrUnsupported   = errors.New("server does not support hot backup")
	ErrNotLocalhost  = errors.New("session must be direct session to localhost")
	ErrNotDirectConn = errors.New("session is not direct")
)
View Source
var (
	RestoreStopServerRetries = 60 * 4
	RestoreStopServerWait    = 250 * time.Millisecond
)

Functions

This section is empty.

Types

type Backup

type Backup struct {
	// contains filtered or unexported fields
}

func NewBackup

func NewBackup(session *mgo.Session, backupDir string) (*Backup, error)

NewBackup creates a Percona Server for MongoDB Hot Backup and outputs it to the specified backup directory. The provided MongoDB session must be a direct connection to localhost/127.0.0.1

https://www.percona.com/doc/percona-server-for-mongodb/LATEST/hot-backup.html

func (*Backup) Close

func (b *Backup) Close()

Close cleans-up and removes the Hot Backup

func (*Backup) Dir

func (b *Backup) Dir() string

Dir returns the path to the Hot Backup directory

func (*Backup) Remove

func (b *Backup) Remove() error

Remove removes the Hot Backup directory and data

type Restore

type Restore struct {
	// contains filtered or unexported fields
}

func NewRestore

func NewRestore(session *mgo.Session, backupPath, dbPath string) (*Restore, error)

func (*Restore) Close

func (r *Restore) Close()

Jump to

Keyboard shortcuts

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