btrfs

package
v0.0.0-...-88aa921 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DriverName is the name of this btrfs driver implementation
	DriverName = "btrfs"
)

Variables

This section is empty.

Functions

func IsBtrfsFilesystem

func IsBtrfsFilesystem(thePath string) error

IsBtrfsFilesystem determines whether the path is a btrfs filesystem

Types

type BtrfsConn

type BtrfsConn struct {
	sync.Mutex
	// contains filtered or unexported fields
}

BtrfsConn is a connection to a btrfs volume

func (*BtrfsConn) Export

func (c *BtrfsConn) Export(label, parent, outfile string) error

Export saves a snapshot to an outfile

func (*BtrfsConn) Import

func (c *BtrfsConn) Import(label, infile string) error

Import loads a snapshot from an infile

func (*BtrfsConn) Name

func (c *BtrfsConn) Name() string

Name provides the name of the subvolume

func (*BtrfsConn) Path

func (c *BtrfsConn) Path() string

Path provides the full path to the subvolume

func (*BtrfsConn) RemoveSnapshot

func (c *BtrfsConn) RemoveSnapshot(label string) error

RemoveSnapshot removes the snapshot with the given label

func (*BtrfsConn) Rollback

func (c *BtrfsConn) Rollback(label string) error

Rollback rolls back the volume to the given snapshot

func (*BtrfsConn) Snapshot

func (c *BtrfsConn) Snapshot(label string) error

Snapshot performs a readonly snapshot on the subvolume

func (*BtrfsConn) SnapshotPath

func (c *BtrfsConn) SnapshotPath(label string) string

func (*BtrfsConn) Snapshots

func (c *BtrfsConn) Snapshots() ([]string, error)

Snapshots returns the current snapshots on the volume (sorted by date)

func (*BtrfsConn) Unmount

func (c *BtrfsConn) Unmount() error

Unmount removes the subvolume that houses all of the snapshots

type BtrfsDriver

type BtrfsDriver struct {
	sync.Mutex
	// contains filtered or unexported fields
}

BtrfsDriver is a driver for the btrfs volume

func New

func New() (*BtrfsDriver, error)

New creates a new BtrfsDriver

func (*BtrfsDriver) List

func (d *BtrfsDriver) List(rootDir string) (result []string)

List returns a list of btrfs subvolumes at a given root dir

func (*BtrfsDriver) Mount

func (d *BtrfsDriver) Mount(volumeName, rootDir string) (volume.Volume, error)

Mount creates a new subvolume at given root dir

Jump to

Keyboard shortcuts

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