zfs

package module
v0.0.0-...-e5fe14d Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: BSD-2-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatasetExists

func DatasetExists(name string) bool

DatasetExists checks for the existence of a dataset

func IsEmpty

func IsEmpty(name string) (bool, error)

IsEmpty returns whether or not a directory is empty

func SnapshotExists

func SnapshotExists(Name string) bool

SnapshotExists checks for the existence of a dataset

Types

type Dataset

type Dataset struct {
	Name string
}

Dataset is a zfs dataset

func CreateDataset

func CreateDataset(name string, properties map[string]string) (*Dataset, error)

CreateDataset creates a dataset

func CreateDatasetRecursive

func CreateDatasetRecursive(name string, properties map[string]string) (*Dataset, error)

CreateDatasetRecursive recursively creates a dataset

func DatasetList

func DatasetList() ([]Dataset, error)

DatasetList lists all datasets

func GetDataset

func GetDataset(name string) (*Dataset, error)

GetDataset returns a zfs dataset object from a string

func (*Dataset) DatasetList

func (ds *Dataset) DatasetList() ([]Dataset, error)

DatasetList lists all child datasets

func (*Dataset) Destroy

func (ds *Dataset) Destroy() error

Destroy destroys a dataset

func (*Dataset) GetCreation

func (ds *Dataset) GetCreation() (time.Time, error)

func (*Dataset) GetExactProperty

func (ds *Dataset) GetExactProperty(property string) (string, error)

GetExactProperty returns a property for a dataset using exact values

func (*Dataset) GetMountpoint

func (ds *Dataset) GetMountpoint() (string, error)

GetMountpoint returns the mountpoint for a dataset

func (*Dataset) GetProperty

func (ds *Dataset) GetProperty(property string) (string, error)

GetProperty returns a property for a dataset

func (*Dataset) Promote

func (ds *Dataset) Promote() error

Promote promotes a cloned dataset

func (*Dataset) Snapshot

func (ds *Dataset) Snapshot(name string) (*Snapshot, error)

Snapshot creates a snapshot

type Snapshot

type Snapshot struct {
	Name string
}

Snapshot represents a zfs snapshot

func GetSnapshot

func GetSnapshot(name string) (*Snapshot, error)

GetSnapshot returns a snapshot from a string

func (*Snapshot) Clone

func (sn *Snapshot) Clone(target string) (*Dataset, error)

Clone clones a snapshot

Directories

Path Synopsis
Package cmd provides a thin wrapper around zfs commands
Package cmd provides a thin wrapper around zfs commands

Jump to

Keyboard shortcuts

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