backupmode

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() http.Handler

func RestoreBaseBackup

func RestoreBaseBackup(ctx context.Context, cfg *config.Config, id, dest string) error

Types

type BaseBackup

type BaseBackup interface {
	StreamBackup(ctx context.Context) (*Result, error)
}

BaseBackup is an API for streaming basebackup

func NewBaseBackup

func NewBaseBackup(conn *pgconn.PgConn, storage st.Storage, timestamp string) (BaseBackup, error)

type CreateBaseBackupOpts

type CreateBaseBackupOpts struct {
	Directory string
}

type Result

type Result struct {
	StartLSN    pglogrepl.LSN `json:"start_lsn,omitempty"`
	StopLSN     pglogrepl.LSN `json:"stop_lsn,omitempty"`
	TimelineID  int32         `json:"timeline_id,omitempty"`
	Tablespaces []Tablespace  `json:"tablespaces,omitempty"`
	BytesTotal  int64         `json:"bytes_total,omitempty"`
}

Result will hold the return values of the BaseBackup command

func CreateBaseBackup

func CreateBaseBackup(opts *CreateBaseBackupOpts) (*Result, error)

type Tablespace

type Tablespace struct {
	OID      int32  `json:"oid,omitempty"`
	Location string `json:"location,omitempty"`
	Size     int8   `json:"size,omitempty"`
}

Tablespace represents a tablespace in the backup

Jump to

Keyboard shortcuts

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