mongo

package
v0.0.0-...-86c6960 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleBackupDelete

func HandleBackupDelete(backupName string, downloader archive.Downloader, purger archive.Purger, dryRun bool) error

HandleBackupDelete deletes backup.

func HandleBackupPush

func HandleBackupPush(uploader archive.Uploader,
	metaConstructor internal.MetaConstructor,
	backupCmd *exec.Cmd) error

HandleBackupPush starts backup procedure.

func HandleBackupShow

func HandleBackupShow(backupFolder storage.Folder, backupName string, output io.Writer, pretty bool) (err error)

HandleBackupShow prints sentinel contents.

func HandleBackupsPurge

func HandleBackupsPurge(backupTimes []internal.BackupTime,
	downloader archive.Downloader,
	purger archive.Purger,
	opts PurgeSettings) (purge, retain []*models.Backup, err error)

HandleBackupsPurge delete backups according to settings

func HandleBinaryBackupPush

func HandleBinaryBackupPush(ctx context.Context, permanent bool, appName string) error

func HandleBinaryFetchPush

func HandleBinaryFetchPush(ctx context.Context, mongodConfigPath, minimalConfigPath, backupName, restoreMongodVersion,
	rsName, rsMembers string,
) error

func HandleDetailedBackupList

func HandleDetailedBackupList(folder storage.Folder, output io.Writer, pretty, json bool) error

func HandleOplogPurge

func HandleOplogPurge(downloader archive.Downloader, purger archive.Purger, retainAfter *time.Time, dryRun bool) error

HandleOplogPurge delete oplog archives according to settings

func HandleOplogPush

func HandleOplogPush(ctx context.Context, fetcher stages.Fetcher, applier stages.Applier) error

HandleOplogPush starts oplog archiving process: fetch, validate, upload to storage.

func HandleOplogReplay

func HandleOplogReplay(ctx context.Context,
	since,
	until models.Timestamp,
	fetcher stages.BetweenFetcher,
	applier stages.Applier) error

HandleOplogReplay starts oplog replay process: download from storage and apply to mongodb

func HandlePurge

func HandlePurge(downloader archive.Downloader, purger archive.Purger, setters ...PurgeOption) error

HandlePurge delete backups and oplog archives according to settings

func LoadBackups

func LoadBackups(downloader archive.Downloader) ([]*models.Backup, error)

Types

type BackupDetail

type BackupDetail struct {
	models.Backup
	ModifyTime time.Time `json:"modify_time"`
}

func NewBackupDetail

func NewBackupDetail(backupTime internal.BackupTime, sentinel *models.Backup) *BackupDetail

type PurgeOption

type PurgeOption func(*PurgeSettings)

func PurgeDryRun

func PurgeDryRun(dryRun bool) PurgeOption

PurgeDryRun ...

func PurgeGarbage

func PurgeGarbage(purgeGarbage bool) PurgeOption

PurgeGarbage ...

func PurgeOplog

func PurgeOplog(purgeOplog bool) PurgeOption

PurgeOplog ...

func PurgeRetainAfter

func PurgeRetainAfter(retainAfter time.Time) PurgeOption

PurgeRetainAfter ...

func PurgeRetainCount

func PurgeRetainCount(retainCount int) PurgeOption

PurgeRetainCount ...

type PurgeSettings

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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