postgres

package
v0.0.0-...-395ddcd Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package postgres contains the implementation of the backupengine for PostgreSQL

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine implements backupengine interface

func New

func New() *Engine

New creates a new Engine instance

func (*Engine) CreateBackup

func (e *Engine) CreateBackup(w io.Writer) error

CreateBackup is used to instruct the backup engine to create a backup. The means of doing so depends on the engine itself.

func (*Engine) GetPodSpec

func (e *Engine) GetPodSpec(imagePrefix string) (coreV1.PodSpec, error)

GetPodSpec generates a pod-spec from the given backup specificiation containing required volume mounts from secrets or envFrom definitions (and possible other special cases). The mounted secret will be added by the controller.

func (*Engine) Init

func (e *Engine) Init(options opts.InitOpts) error

Init is called once per backup engine and allows to execute one-shot initialization tasks like registering new HTTP handlers

func (*Engine) RestoreBackup

func (e *Engine) RestoreBackup(r io.ReaderAt, size int64) error

RestoreBackup receives an io.ReaderAt with the contents of the backup to be restored and the size of the backup. The means of doing so depends on the engine itself. The contents of the reader will be the same the engine provided during the CreateBackup result

func (Engine) Unpack

func (Engine) Unpack(r io.ReaderAt, size int64, destDir string) error

Unpack takes the backed up contents and puts then imto a single SQL file

Jump to

Keyboard shortcuts

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