restore

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 30 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDatForShard = errors.New("no data for shard")

Functions

func Decompress added in v1.2.0

func Decompress(r io.Reader, c pbm.CompressionType) (io.ReadCloser, error)

Decompress wraps given reader by the decompressing io.ReadCloser

Types

type Oplog

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

Oplog is the oplog applyer

func NewOplog

func NewOplog(dst *pbm.Node, sv *pbm.MongoVersion, preserveUUID bool) (*Oplog, error)

NewOplog creates an object for an oplog applying

func (*Oplog) Apply

func (o *Oplog) Apply(src io.ReadCloser) (lts primitive.Timestamp, err error)

Apply applys an oplog from a given source

func (*Oplog) SetEdge added in v1.3.0

func (o *Oplog) SetEdge(ts primitive.Timestamp)

SetEdge sets the edge time for the replayed operations E.g. all operation that happened afterthe given timestamp going to be discarded

func (*Oplog) SetEdgeUnix added in v1.3.0

func (o *Oplog) SetEdgeUnix(ts int64)

SetEdgeUnix sets the edge time for the replayed operations E.g. all operation that happened afterthe given timestamp going to be discarded

type Restore added in v1.1.2

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

func New added in v1.1.2

func New(cn *pbm.PBM, node *pbm.Node) *Restore

New creates a new restore object

func (*Restore) Close added in v1.3.0

func (r *Restore) Close()

Close releases object resources. Should be run to avoid leaks.

func (*Restore) Done added in v1.3.0

func (r *Restore) Done() error

Done waits for the replicas to finish the job and marks restore as done

func (*Restore) MarkFailed added in v1.1.2

func (r *Restore) MarkFailed(e error) error

MarkFailed sets the restore and rs state as failed with the given message

func (*Restore) PITR added in v1.3.0

func (r *Restore) PITR(cmd pbm.PITRestoreCmd, opid pbm.OPID, l *log.Event) (err error)

PITR do Point-in-Time Recovery

func (*Restore) PrepareBackup added in v1.3.0

func (r *Restore) PrepareBackup(backupName string) (err error)

func (*Restore) PreparePITR added in v1.3.0

func (r *Restore) PreparePITR(ts int64, bcp string) (err error)

func (*Restore) RestoreChunks added in v1.3.0

func (r *Restore) RestoreChunks() error

RestoreChunks replays PITR oplog chunks

func (*Restore) RunSnapshot added in v1.3.0

func (r *Restore) RunSnapshot() (err error)

func (*Restore) Snapshot added in v1.3.0

func (r *Restore) Snapshot(cmd pbm.RestoreCmd, opid pbm.OPID, l *log.Event) (err error)

Snapshot do the snapshot's (mongo dump) restore

Jump to

Keyboard shortcuts

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