restic

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvAWSAccessKeyID for anthentication.
	EnvAWSAccessKeyID = "AWS_ACCESS_KEY_ID"
	// EnvAWSSecretAccessKey for anthentication.
	EnvAWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
	// EnvResticRepository for Restic configuration.
	EnvResticRepository = "RESTIC_REPOSITORY"
	// EnvResticPasswordFile for Restic configuration.
	EnvResticPasswordFile = "RESTIC_PASSWORD_FILE"

	// SecretDir defines the directory where secrets are mounted.
	SecretDir = "/etc/restic"
)
View Source
const (
	// EnvMySQLHostname for MySQL connection.
	EnvMySQLHostname = "MYSQL_HOSTNAME"
	// EnvMySQLDatabase for MySQL connection.
	EnvMySQLDatabase = "MYSQL_DATABASE"
	// EnvMySQLPort for MySQL connection.
	EnvMySQLPort = "MYSQL_PORT"
	// EnvMySQLUsername for MySQL connection.
	EnvMySQLUsername = "MYSQL_USERNAME"
	// EnvMySQLPassword for MySQL connection.
	EnvMySQLPassword = "MYSQL_PASSWORD"

	// VolumeMySQL identifier for mysql storage.
	VolumeMySQL = "restic-mysql"
)
View Source
const Prefix = "backup-restic"

Prefix for discoverying Restic resources.

View Source
const ResticBackupContainerName = "restic-backup"

ResticBackupContainerName is the name of the container in the restic backup pod.

View Source
const RestorePrefix = "restore-restic"

RestorePrefix for discoverying Restic Restore resources.

View Source
const ScheduledTag = "scheduled"

ScheduledTag is the tag to applied to scheduled backups.

View Source
const VolumeSecrets = "restic-secrets"

VolumeSecrets identifier used for Restic secret.

Variables

This section is empty.

Functions

func AttachVolume

func AttachVolume(volumes []corev1.Volume, secret string) []corev1.Volume

AttachVolume will add the Restic secrets volume to a Pod.

func ParseSnapshotID added in v0.4.0

func ParseSnapshotID(input string) string

ParseSnapshotID parses the restic snapshot id from a string.

func PodSpecBackup added in v0.4.1

func PodSpecBackup(backup *extensionsv1beta1.Backup, params PodSpecParams) (corev1.PodSpec, error)

PodSpecBackup defines how a backup can be executed using a Pod.

func PodSpecRestore added in v0.4.1

func PodSpecRestore(restore *extensionsv1beta1.Restore, resticID string, params PodSpecParams) (corev1.PodSpec, error)

PodSpecRestore defines how a restore can be executed using a Pod.

func WrapContainer

func WrapContainer(container corev1.Container, key, secret, bucket, repository, passwordFile string) corev1.Container

WrapContainer with the information required to interact with Restic.

Types

type PodSpecParams

type PodSpecParams struct {
	Bucket      string
	KeyID       string
	AccessKey   string
	CPU         string
	Memory      string
	ResticImage string
	MySQLImage  string
	WorkingDir  string
}

PodSpecParams which are passed into the PodSpecBackup function.

Jump to

Keyboard shortcuts

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