restore

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Decompress

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

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

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

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

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

func New

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

New creates a new restore object

func (*Restore) Close

func (r *Restore) Close()

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

func (*Restore) Done

func (r *Restore) Done() error

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

func (*Restore) MarkFailed

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

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

func (*Restore) PITR

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

PITR do Point-in-Time Recovery

func (*Restore) PrepareBackup

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

func (*Restore) PreparePITR

func (r *Restore) PreparePITR(ts int64) (err error)

func (*Restore) RestoreChunks

func (r *Restore) RestoreChunks() error

RestoreChunks replays PITR oplog chunks

func (*Restore) RunSnapshot

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

func (*Restore) Snapshot

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