sharded

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backuper added in v1.3.2

type Backuper interface {
	Backup()
	Restore()
	WaitStarted()
	WaitSnapshot()
	WaitDone()
}

type Cluster

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

func New

func New(cfg ClusterConf) *Cluster

func (*Cluster) ApplyConfig

func (c *Cluster) ApplyConfig(file string)

func (*Cluster) BackupAndRestore

func (c *Cluster) BackupAndRestore(typ pbm.BackupType)

func (*Cluster) BackupBoundsCheck

func (c *Cluster) BackupBoundsCheck(typ pbmt.BackupType, mongoVersion string)

func (*Cluster) BackupCancellation added in v1.2.0

func (c *Cluster) BackupCancellation(storage string)

func (*Cluster) BackupDelete added in v1.2.0

func (c *Cluster) BackupDelete(storage string)

func (*Cluster) BackupNotDeleteRunning added in v1.2.0

func (c *Cluster) BackupNotDeleteRunning()

func (*Cluster) BackupWaitDone

func (c *Cluster) BackupWaitDone(bcpName string)

func (*Cluster) ClockSkew

func (c *Cluster) ClockSkew(typ pbmt.BackupType, mongoVersion string)

func (*Cluster) DataChecker

func (c *Cluster) DataChecker() (check func())

func (*Cluster) DeleteBallast

func (c *Cluster) DeleteBallast()

func (*Cluster) DistributedCommit added in v1.7.0

func (c *Cluster) DistributedCommit(restoreTo primitive.Timestamp)

func (*Cluster) DistributedTransactions

func (c *Cluster) DistributedTransactions(bcp Backuper, col string)

func (*Cluster) DistributedTransactionsPhys added in v1.8.0

func (c *Cluster) DistributedTransactionsPhys(bcp Backuper, col string)

func (*Cluster) DistributedTrxPITR added in v1.3.2

func (c *Cluster) DistributedTrxPITR()

func (*Cluster) DistributedTrxPhysical added in v1.7.0

func (c *Cluster) DistributedTrxPhysical()

func (*Cluster) DistributedTrxSnapshot added in v1.3.2

func (c *Cluster) DistributedTrxSnapshot()

func (*Cluster) Flush added in v1.6.0

func (c *Cluster) Flush() error

Flush removes all backups, restores and PITR chunks metadata from the PBM db

func (*Cluster) FlushStorage added in v1.6.0

func (c *Cluster) FlushStorage() error

func (*Cluster) LeaderLag added in v1.5.0

func (c *Cluster) LeaderLag()

LeaderLag checks if cluster deals with leader lag during backup start https://jira.percona.com/browse/PBM-635

func (*Cluster) LogicalBackup added in v1.7.0

func (c *Cluster) LogicalBackup() string

func (*Cluster) LogicalRestore added in v1.7.0

func (c *Cluster) LogicalRestore(bcpName string)

func (*Cluster) NetworkCut

func (c *Cluster) NetworkCut()

func (*Cluster) OplogReplay added in v1.7.0

func (c *Cluster) OplogReplay()

func (*Cluster) PITRbasic added in v1.3.2

func (c *Cluster) PITRbasic()

func (*Cluster) PITRestore added in v1.3.2

func (c *Cluster) PITRestore(t time.Time)

func (*Cluster) PITRestoreCT added in v1.7.0

func (c *Cluster) PITRestoreCT(t primitive.Timestamp)

func (*Cluster) PhysicalBackup added in v1.7.0

func (c *Cluster) PhysicalBackup() string

func (*Cluster) PhysicalRestore added in v1.7.0

func (c *Cluster) PhysicalRestore(bcpName string)

func (*Cluster) Reconnect added in v1.7.0

func (c *Cluster) Reconnect()

func (*Cluster) ReplayOplog added in v1.7.0

func (c *Cluster) ReplayOplog(a, b time.Time)

func (*Cluster) RestartAgents

func (c *Cluster) RestartAgents()

RestartAgents restarts agents during backup. Currently restarts agents on all shards. Also consider restarting only one shard and/or configsrv, but see https://jira.percona.com/browse/PBM-406?focusedCommentId=248029&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-248029

func (*Cluster) ServerVersion

func (c *Cluster) ServerVersion() string

func (*Cluster) SetBallastData added in v1.5.0

func (c *Cluster) SetBallastData(amount int64)

func (*Cluster) Timeseries added in v1.6.0

func (c *Cluster) Timeseries()

type ClusterConf

type ClusterConf struct {
	Configsrv       string
	Mongos          string
	Shards          map[string]string
	DockerSocket    string
	ConfigsrvRsName string
}

type Physical added in v1.7.0

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

func NewPhysical added in v1.7.0

func NewPhysical(c *Cluster) *Physical

func (*Physical) Backup added in v1.7.0

func (s *Physical) Backup()

func (*Physical) Restore added in v1.7.0

func (s *Physical) Restore()

func (*Physical) WaitDone added in v1.7.0

func (s *Physical) WaitDone()

func (*Physical) WaitSnapshot added in v1.7.0

func (s *Physical) WaitSnapshot()

func (*Physical) WaitStarted added in v1.7.0

func (s *Physical) WaitStarted()

type Pitr added in v1.3.2

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

func NewPitr added in v1.3.2

func NewPitr(c *Cluster) *Pitr

func (*Pitr) Backup added in v1.3.2

func (p *Pitr) Backup()

func (*Pitr) Restore added in v1.3.2

func (p *Pitr) Restore()

func (*Pitr) WaitDone added in v1.3.2

func (p *Pitr) WaitDone()

func (*Pitr) WaitSnapshot added in v1.3.2

func (p *Pitr) WaitSnapshot()

func (*Pitr) WaitStarted added in v1.3.2

func (p *Pitr) WaitStarted()

type Snapshot added in v1.3.2

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

func NewSnapshot added in v1.3.2

func NewSnapshot(c *Cluster) *Snapshot

func (*Snapshot) Backup added in v1.3.2

func (s *Snapshot) Backup()

func (*Snapshot) Restore added in v1.3.2

func (s *Snapshot) Restore()

func (*Snapshot) WaitDone added in v1.3.2

func (s *Snapshot) WaitDone()

func (*Snapshot) WaitSnapshot added in v1.3.2

func (s *Snapshot) WaitSnapshot()

func (*Snapshot) WaitStarted added in v1.3.2

func (s *Snapshot) WaitStarted()

Jump to

Keyboard shortcuts

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