restore

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package restore provides the restore functionality for CNPGI.

Index

Constants

View Source
const (
	// ScratchDataDirectory is the directory to be used for scratch data
	ScratchDataDirectory = "/controller"

	// RecoveryTemporaryDirectory provides a path to store temporary files
	// needed in the recovery process
	RecoveryTemporaryDirectory = ScratchDataDirectory + "/recovery"
)

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context) error

Start starts the sidecar informers and CNPG-i server

Types

type CNPGI

type CNPGI struct {
	PluginPath     string
	SpoolDirectory string

	Client       client.Client
	PGDataPath   string
	InstanceName string
}

CNPGI is the implementation of the PostgreSQL sidecar

func (*CNPGI) Start

func (c *CNPGI) Start(ctx context.Context) error

Start starts the GRPC service

type IdentityImplementation

type IdentityImplementation struct {
	identity.UnimplementedIdentityServer
	BarmanObjectKey client.ObjectKey
	Client          client.Client
}

IdentityImplementation implements IdentityServer

func (IdentityImplementation) GetPluginCapabilities

GetPluginCapabilities implements IdentityServer

func (IdentityImplementation) GetPluginMetadata

GetPluginMetadata implements IdentityServer

func (IdentityImplementation) Probe

Probe implements IdentityServer

type JobHookImpl

type JobHookImpl struct {
	restore.UnimplementedRestoreJobHooksServer

	Client client.Client

	SpoolDirectory       string
	PgDataPath           string
	PgWalFolderToSymlink string
}

JobHookImpl is the implementation of the restore job hooks

func (JobHookImpl) GetCapabilities

GetCapabilities returns the capabilities of the restore job hooks

func (JobHookImpl) Restore

Restore restores the cluster from a backup

type ShortBackupCatalogEntry added in v0.4.0

type ShortBackupCatalogEntry struct {
	// BackupID is the backup ID
	BackupID string `json:"backupID"`

	// StartTime is the backup time
	StartTime time.Time `json:"startTime"`

	// EndTime is the end time
	EndTime time.Time `json:"endTime"`
}

ShortBackupCatalogEntry is used when logging the downloaded backup catalog and contains only the fields used for debugging

Jump to

Keyboard shortcuts

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