btrfs

package
v0.0.0-...-17d5a85 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2014 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Snapshots []string
}

type Btrfs

type Btrfs struct {
	BackupConfig config.Config
}

func (*Btrfs) CreateSubvolume

func (d *Btrfs) CreateSubvolume(subvolumeDir string) (string, error)

func (*Btrfs) Prepare

func (d *Btrfs) Prepare(config config.Config) error

func (*Btrfs) SendSubvolume

func (d *Btrfs) SendSubvolume(subvolume string) error

func (*Btrfs) Snapshot

func (d *Btrfs) Snapshot(config config.Config, srcSnapshot string) (string, error)

func (*Btrfs) Subvolumes

func (d *Btrfs) Subvolumes(config config.Config) ([]string, error)

type BtrfsRPC

type BtrfsRPC struct {
	Driver *Btrfs
}

func (*BtrfsRPC) ReceiveSnapshot

func (d *BtrfsRPC) ReceiveSnapshot(args *Snapshot, reply *bool) error

func (*BtrfsRPC) SnapshotsNeeded

func (d *BtrfsRPC) SnapshotsNeeded(args *Args, reply *[]string) error

type Driver

type Driver interface {

	// Prepares configuration and sets variables
	Prepare(interface{}) error

	// Return slice of subvolumes part of this filesystem
	// Returns results of `btrfs subvolume list <Subvolume()>`
	Subvolumes(interface{}) ([]string, error)

	// Create a new filesystem snapshot, will always
	// store the snapshot under <Subvolume>/<SnapshotsDirectory>
	// returns snapshot location under success, error if not
	Snapshot(interface{}, string) (string, error)

	// Function to create a subbvolume of the specified directory
	// Assumes that the directory doesn't already exists and does
	// No error checking, the caller should do this.
	CreateSubvolume(string) (string, error)
}

Driver interface, designed to enable addition of new storage drivers in the future

type Snapshot

type Snapshot struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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