zfs

package
v0.0.0-...-c07804e Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SnapshotCreate

func SnapshotCreate(ctx context.Context, log logr.Logger, filesystem string) (string, uint64, error)

SnapshotCreate creates a snapshot of the given filesystem. Returns the name of the zfs snapshot, and its size.

func SnapshotSize

func SnapshotSize(ctx context.Context, log logr.Logger, snapshot string) (uint64, error)

SnapshotSize returns the size of the given zfs snapshot.

Types

type ZFSReader

type ZFSReader func(context.Context, logr.Logger) (io.ReadCloser, error)

ZFSReader is a function that returns a reader for a zfs snapshot, configured with the given logger.

func SnapshotSendFull

func SnapshotSendFull(ctx context.Context, log logr.Logger, snapshot string) (ZFSReader, error)

SnapshotSendFull sends the given zfs full snapshot to the returned reader.

func SnapshotSendInc

func SnapshotSendInc(ctx context.Context, log logr.Logger, fromSnapshot, toSnapshot string) (ZFSReader, error)

SnapshotSendInc sends the given zfs incremental snapshot to the returned reader.

Jump to

Keyboard shortcuts

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