Documentation
¶
Overview ¶
Package lib contains: cleaner.go - consul.go - destroy.go - runner.go - snapshot.go - sync.go - take.go - tracker.go
Cleaner removes all keys with the flag #NotWritten and #deleted at the datacenter indicated
Package lib contains: cleaner.go - consul.go - destroy.go - runner.go - snapshot.go - sync.go - take.go - tracker.go
Consul get the status of a Consul member and provides the functions to put or delete a KV pair ¶
Package lib contains: cleaner.go - consul.go - destroy.go - runner.go - snapshot.go - sync.go - take.go - tracker.go
Functions to destroy a snapshot ¶
Package lib contains: cleaner.go - consul.go - destroy.go - runner.go - snapshot.go - sync.go - take.go - tracker.go
Runner provides all ZFS functions to manage the datasets and backups ¶
Package lib contains: cleaner.go - consul.go - destroy.go - runner.go - snapshot.go - sync.go - take.go - tracker.go
Snapshot provides the functions to get the properties of snapshots ¶
Package lib contains: cleaner.go - consul.go - destroy.go - runner.go - snapshot.go - sync.go - take.go - tracker.go
Sync writes a check KV to synchronize zeplic and resynchronize all pairs ¶
Package lib contains: cleaner.go - consul.go - destroy.go - runner.go - snapshot.go - sync.go - take.go - tracker.go
Functions to create a snapshot ¶
Package lib contains: cleaner.go - consul.go - destroy.go - runner.go - snapshot.go - sync.go - take.go - tracker.go
Tracker searchs in local datasets
Index ¶
- Constants
- func Alive() bool
- func Backup(ds *zfs.Dataset)
- func Cleaner(RealDataset string) int
- func Client() (*api.Client, *api.KV)
- func Clone(clone string, snap *zfs.Dataset)
- func CreateTime(SnapshotName string) (int, time.Month, int, int, int, int)
- func Dataset(dataset string) (*zfs.Dataset, error)
- func DatasetName(SnapshotName string) string
- func DeleteBackup(ds *zfs.Dataset, backup int)
- func DeleteClone(cl *zfs.Dataset)
- func DeleteKV(key string, value string, datacenter string) int
- func Delivery(MapUUID []string, SnapshotName string) ([]byte, bool, bool, *zfs.Dataset, *zfs.Dataset)
- func DestroyOrder(SnapshotUUID []string, SkipIfRenamed bool, SkipIfCloned bool)
- func Host() string
- func InfoKV(pair string) (string, string, string)
- func LastSnapshot(ds *zfs.Dataset, prefix string) string
- func ListKV(keyfix string, datacenter string) api.KVPairs
- func Policy(ds *zfs.Dataset, retention int, consul bool, datacenter string)
- func Prefix(SnapshotName string) string
- func PutKV(key string, value string, datacenter string) int
- func RealList(ds *zfs.Dataset, prefix string) (int, []int)
- func RealRunner(ds *zfs.Dataset, snap *zfs.Dataset, delClone bool, clone string, director bool, ...)
- func Resync(timezone []string) bool
- func Retention(retention []string) (int, int, int, int)
- func Rollback(snap *zfs.Dataset)
- func Runner(index int, director bool, SnapshotName string, NotWritten bool) int
- func SearchName(uuid string) string
- func SearchUUID(snap *zfs.Dataset) string
- func SnapBackup(ds *zfs.Dataset) string
- func SnapCloned(snap *zfs.Dataset) (bool, string)
- func SnapName(prefix string) string
- func SnapRenamed(SnapshotReceived string, SnapshotToCheck string) bool
- func Snapshot(prefix string, ds *zfs.Dataset, consul bool, datacenter string) *zfs.Dataset
- func Source(uuid string) string
- func Sync(hostname string, datacenter string, dataset string, index int)
- func TakeOrder(DestDataset string, SnapshotName string, NotWritten bool)
- func TakeSnapshot(SnapshotName string, SkipIfNotWritten bool, ds *zfs.Dataset, consul bool, ...) *zfs.Dataset
- func UUID(snap *zfs.Dataset) error
- func Up(KVList []string, SnapshotsList []string, SourceList []string, DeleteList []int, ...)
- func Update(datacenter string, dataset string)
- func Written(ds *zfs.Dataset, SnapshotName string) bool
Constants ¶
const ( WasRenamed = iota + 1 // The snapshot sent was renamed on destination WasWritten // The snapshot sent was written on destination NothingToDo // The snapshot sent already existed on destination Zerror // Any error string NotEmpty // Need an incremental stream Incremental // Ready to send an incremental stream MostActual // The last snapshot on destination is the most actual )
Status for response
Variables ¶
This section is empty.
Functions ¶
func CreateTime ¶
CreateTime returns the date of snapshot's creation
func DatasetName ¶
DatasetName returns the dataset name of snapshot
func DeleteBackup ¶
func DeleteBackup(ds *zfs.Dataset, backup int)
DeleteBackup deletes the backup snapshot
func Delivery ¶
func Delivery(MapUUID []string, SnapshotName string) ([]byte, bool, bool, *zfs.Dataset, *zfs.Dataset)
Delivery compares the local dataset with the list of UUIDs received
func DestroyOrder ¶
DestroyOrder destroys a snapshot based on the order received from director
func LastSnapshot ¶
LastSnapshot returns the name of last snapshot in 'dataset'
func RealRunner ¶
func RealRunner(ds *zfs.Dataset, snap *zfs.Dataset, delClone bool, clone string, director bool, retention int, consul bool, datacenter string, getBackup bool, getClone bool)
RealRunner executes extra ZFS functions if a new snapshot has been created/received
func SearchName ¶
SearchName searchs the name of snapshot from its uuid
func SearchUUID ¶
func SearchUUID(snap *zfs.Dataset) string
SearchUUID searchs the uuid of snapshot from its name
func SnapBackup ¶
func SnapBackup(ds *zfs.Dataset) string
SnapBackup defines the name of a backup snapshot: BACKUP_from_yyyy-Month-dd
func SnapCloned ¶
SnapCloned searchs the name of the dataset where a snapshot was cloned
func SnapRenamed ¶
SnapRenamed returns true if a snapshot was renamed
func TakeSnapshot ¶
func TakeSnapshot(SnapshotName string, SkipIfNotWritten bool, ds *zfs.Dataset, consul bool, datacenter string) *zfs.Dataset
TakeSnapshot creates a new snapshot
func Up ¶
func Up(KVList []string, SnapshotsList []string, SourceList []string, DeleteList []int, CreateList []int)
Up *** test for Update() function ***
Types ¶
This section is empty.