Documentation ¶
Overview ¶
Package restic is the top level package for the restic backup program, please see https://github.com/restic/restic for more information.
This package exposes the main objects that are handled in restic.
Index ¶
- Constants
- Variables
- func CiphertextLength(plaintextSize int) int
- func Find(be Lister, t FileType, prefix string) (string, error)
- func FindUsedBlobs(ctx context.Context, repo Repository, treeID ID, blobs BlobSet, seen BlobSet) error
- func Getxattr(path, name string) ([]byte, error)
- func IsAlreadyLocked(err error) bool
- func Listxattr(path string) ([]string, error)
- func NewBlobBuffer(size int) []byte
- func NewRandReader(rnd *rand.Rand) io.Reader
- func PlaintextLength(ciphertextSize int) int
- func PrefixLength(be Lister, t FileType) (int, error)
- func ReadAt(ctx context.Context, be Backend, h Handle, offset int64, p []byte) (n int, err error)
- func ReaderAt(be Backend, h Handle) io.ReaderAt
- func RemoveAllLocks(ctx context.Context, repo Repository) error
- func RemoveStaleLocks(ctx context.Context, repo Repository) error
- func Setxattr(path, name string, data []byte) error
- func TestSetLockTimeout(t testing.TB, d time.Duration)
- type Backend
- type Blob
- type BlobHandle
- type BlobHandles
- type BlobSet
- func (s BlobSet) Delete(h BlobHandle)
- func (s BlobSet) Equals(other BlobSet) bool
- func (s BlobSet) Has(h BlobHandle) bool
- func (s BlobSet) Insert(h BlobHandle)
- func (s BlobSet) Intersect(other BlobSet) (result BlobSet)
- func (s BlobSet) List() BlobHandles
- func (s BlobSet) Merge(other BlobSet)
- func (s BlobSet) String() string
- func (s BlobSet) Sub(other BlobSet) (result BlobSet)
- type BlobType
- type Config
- type Deleter
- type ErrAlreadyLocked
- type ExpirePolicy
- type ExtendedAttribute
- type FileInfo
- type FileType
- type Handle
- type HardlinkIndex
- type HardlinkKey
- type ID
- func FindLatestSnapshot(ctx context.Context, repo Repository, targets []string, tagLists []TagList, ...) (ID, error)
- func FindSnapshot(repo Repository, s string) (ID, error)
- func Hash(data []byte) ID
- func IDFromHash(hash []byte) (id ID)
- func NewRandomID() ID
- func ParseID(s string) (ID, error)
- func TestParseID(s string) ID
- type IDSet
- func (s IDSet) Delete(id ID)
- func (s IDSet) Equals(other IDSet) bool
- func (s IDSet) Has(id ID) bool
- func (s IDSet) Insert(id ID)
- func (s IDSet) Intersect(other IDSet) (result IDSet)
- func (s IDSet) List() IDs
- func (s IDSet) Merge(other IDSet)
- func (s IDSet) String() string
- func (s IDSet) Sub(other IDSet) (result IDSet)
- type IDs
- type Index
- type JSONUnpackedLoader
- type Lister
- type Lock
- type Node
- func (node *Node) CreateAt(ctx context.Context, path string, repo Repository, idx *HardlinkIndex) error
- func (node Node) Equals(other Node) bool
- func (node Node) GetExtendedAttribute(a string) []byte
- func (node *Node) IsNewer(path string, fi os.FileInfo) bool
- func (node Node) MarshalJSON() ([]byte, error)
- func (node Node) RestoreTimestamps(path string) error
- func (node Node) String() string
- func (node *Node) UnmarshalJSON(data []byte) error
- type PackedBlob
- type Progress
- type ProgressFunc
- type RandReader
- type Repository
- type Restorer
- type Snapshot
- func LoadAllSnapshots(ctx context.Context, repo Repository) (snapshots []*Snapshot, err error)
- func LoadSnapshot(ctx context.Context, repo Repository, id ID) (*Snapshot, error)
- func NewSnapshot(paths []string, tags []string, hostname string) (*Snapshot, error)
- func TestCreateSnapshot(t testing.TB, repo Repository, at time.Time, depth int, duplication float32) *Snapshot
- func (sn *Snapshot) AddTags(addTags []string) (changed bool)
- func (sn *Snapshot) HasPaths(paths []string) bool
- func (sn *Snapshot) HasTagList(l []TagList) bool
- func (sn *Snapshot) HasTags(l []string) bool
- func (sn Snapshot) ID() *ID
- func (sn *Snapshot) RemoveTags(removeTags []string) (changed bool)
- func (sn Snapshot) String() string
- type Snapshots
- type Stat
- type TagList
- type TagLists
- type Tree
Constants ¶
const ( DataFile FileType = "data" KeyFile = "key" LockFile = "lock" SnapshotFile = "snapshot" IndexFile = "index" ConfigFile = "config" )
These are the different data types a backend can store.
const RepoVersion = 1
RepoVersion is the version that is written to the config when a repository is newly created with Init().
Variables ¶
var ErrMultipleIDMatches = errors.New("multiple IDs with prefix found")
ErrMultipleIDMatches is returned by Find() when multiple IDs with the given prefix are found.
var ErrNoIDPrefixFound = errors.New("no ID found")
ErrNoIDPrefixFound is returned by Find() when no ID for the given prefix could be found.
var ErrNoSnapshotFound = errors.New("no snapshot found")
ErrNoSnapshotFound is returned when no snapshot for the given criteria could be found.
Functions ¶
func CiphertextLength ¶ added in v0.4.0
CiphertextLength returns the encrypted length of a blob with plaintextSize bytes.
func Find ¶ added in v0.3.0
Find loads the list of all files of type t and searches for names which start with prefix. If none is found, nil and ErrNoIDPrefixFound is returned. If more than one is found, nil and ErrMultipleIDMatches is returned.
func FindUsedBlobs ¶ added in v0.3.0
func FindUsedBlobs(ctx context.Context, repo Repository, treeID ID, blobs BlobSet, seen BlobSet) error
FindUsedBlobs traverses the tree ID and adds all seen blobs (trees and data blobs) to the set blobs. The tree blobs in the `seen` BlobSet will not be visited again.
func IsAlreadyLocked ¶
IsAlreadyLocked returns true iff err is an instance of ErrAlreadyLocked.
func Listxattr ¶ added in v0.5.0
Listxattr retrieves a list of names of extended attributes associated with the given path in the file system.
func NewBlobBuffer ¶ added in v0.4.0
NewBlobBuffer returns a buffer that is large enough to hold a blob of size plaintext bytes, including the crypto overhead.
func NewRandReader ¶ added in v0.3.0
NewRandReader creates a new Reader from a random source.
func PlaintextLength ¶ added in v0.4.0
PlaintextLength returns the plaintext length of a blob with ciphertextSize bytes.
func PrefixLength ¶ added in v0.3.0
PrefixLength returns the number of bytes required so that all prefixes of all names of type t are unique.
func RemoveAllLocks ¶
func RemoveAllLocks(ctx context.Context, repo Repository) error
RemoveAllLocks removes all locks forcefully.
func RemoveStaleLocks ¶
func RemoveStaleLocks(ctx context.Context, repo Repository) error
RemoveStaleLocks deletes all locks detected as stale from the repository.
Types ¶
type Backend ¶ added in v0.3.0
type Backend interface { // Location returns a string that describes the type and location of the // repository. Location() string // Test a boolean value whether a File with the name and type exists. Test(ctx context.Context, h Handle) (bool, error) // Remove removes a File with type t and name. Remove(ctx context.Context, h Handle) error // Close the backend Close() error // Save stores the data in the backend under the given handle. Save(ctx context.Context, h Handle, rd io.Reader) error // Load returns a reader that yields the contents of the file at h at the // given offset. If length is larger than zero, only a portion of the file // is returned. rd must be closed after use. If an error is returned, the // ReadCloser must be nil. Load(ctx context.Context, h Handle, length int, offset int64) (io.ReadCloser, error) // Stat returns information about the File identified by h. Stat(ctx context.Context, h Handle) (FileInfo, error) // List returns a channel that yields all names of files of type t in an // arbitrary order. A goroutine is started for this, which is stopped when // ctx is cancelled. List(ctx context.Context, t FileType) <-chan string // IsNotExist returns true if the error was caused by a non-existing file // in the backend. IsNotExist(err error) bool }
Backend is used to store and access data.
type BlobHandle ¶ added in v0.3.0
BlobHandle identifies a blob of a given type.
func (BlobHandle) String ¶ added in v0.3.0
func (h BlobHandle) String() string
type BlobHandles ¶ added in v0.3.0
type BlobHandles []BlobHandle
BlobHandles is an ordered list of BlobHandles that implements sort.Interface.
func (BlobHandles) Len ¶ added in v0.3.0
func (h BlobHandles) Len() int
func (BlobHandles) Less ¶ added in v0.3.0
func (h BlobHandles) Less(i, j int) bool
func (BlobHandles) String ¶ added in v0.3.0
func (h BlobHandles) String() string
func (BlobHandles) Swap ¶ added in v0.3.0
func (h BlobHandles) Swap(i, j int)
type BlobSet ¶ added in v0.3.0
type BlobSet map[BlobHandle]struct{}
BlobSet is a set of blobs.
func NewBlobSet ¶ added in v0.3.0
func NewBlobSet(handles ...BlobHandle) BlobSet
NewBlobSet returns a new BlobSet, populated with ids.
func (BlobSet) Delete ¶ added in v0.3.0
func (s BlobSet) Delete(h BlobHandle)
Delete removes id from the set.
func (BlobSet) Has ¶ added in v0.3.0
func (s BlobSet) Has(h BlobHandle) bool
Has returns true iff id is contained in the set.
func (BlobSet) Insert ¶ added in v0.3.0
func (s BlobSet) Insert(h BlobHandle)
Insert adds id to the set.
func (BlobSet) Intersect ¶ added in v0.3.0
Intersect returns a new set containing the handles that are present in both sets.
func (BlobSet) List ¶ added in v0.3.0
func (s BlobSet) List() BlobHandles
List returns a sorted slice of all BlobHandle in the set.
type BlobType ¶ added in v0.3.0
type BlobType uint8
BlobType specifies what a blob stored in a pack is.
These are the blob types that can be stored in a pack.
func (BlobType) MarshalJSON ¶ added in v0.3.0
MarshalJSON encodes the BlobType into JSON.
func (*BlobType) UnmarshalJSON ¶ added in v0.3.0
UnmarshalJSON decodes the BlobType from JSON.
type Config ¶ added in v0.3.0
type Config struct { Version uint `json:"version"` ID string `json:"id"` ChunkerPolynomial chunker.Pol `json:"chunker_polynomial"` }
Config contains the configuration for a repository.
func CreateConfig ¶ added in v0.3.0
CreateConfig creates a config file with a randomly selected polynomial and ID.
func LoadConfig ¶ added in v0.3.0
func LoadConfig(ctx context.Context, r JSONUnpackedLoader) (Config, error)
LoadConfig returns loads, checks and returns the config for a repository.
type ErrAlreadyLocked ¶
type ErrAlreadyLocked struct {
// contains filtered or unexported fields
}
ErrAlreadyLocked is returned when NewLock or NewExclusiveLock are unable to acquire the desired lock.
func (ErrAlreadyLocked) Error ¶
func (e ErrAlreadyLocked) Error() string
type ExpirePolicy ¶ added in v0.3.0
type ExpirePolicy struct { Last int // keep the last n snapshots Hourly int // keep the last n hourly snapshots Daily int // keep the last n daily snapshots Weekly int // keep the last n weekly snapshots Monthly int // keep the last n monthly snapshots Yearly int // keep the last n yearly snapshots Tags []TagList // keep all snapshots that include at least one of the tag lists. }
ExpirePolicy configures which snapshots should be automatically removed.
func (ExpirePolicy) Empty ¶ added in v0.3.0
func (e ExpirePolicy) Empty() bool
Empty returns true iff no policy has been configured (all values zero).
func (ExpirePolicy) Sum ¶ added in v0.3.0
func (e ExpirePolicy) Sum() int
Sum returns the maximum number of snapshots to be kept according to this policy.
type ExtendedAttribute ¶ added in v0.5.0
ExtendedAttribute is a tuple storing the xattr name and value.
type FileInfo ¶ added in v0.3.0
type FileInfo struct{ Size int64 }
FileInfo is returned by Stat() and contains information about a file in the backend.
type HardlinkIndex ¶ added in v0.5.0
type HardlinkIndex struct { Index map[HardlinkKey]string // contains filtered or unexported fields }
HardlinkIndex contains a list of inodes, devices these inodes are one, and associated file names.
func NewHardlinkIndex ¶ added in v0.5.0
func NewHardlinkIndex() *HardlinkIndex
NewHardlinkIndex create a new index for hard links
func (*HardlinkIndex) Add ¶ added in v0.5.0
func (idx *HardlinkIndex) Add(inode uint64, device uint64, name string)
Add adds a link to the index.
func (*HardlinkIndex) GetFilename ¶ added in v0.5.0
func (idx *HardlinkIndex) GetFilename(inode uint64, device uint64) string
GetFilename obtains the filename from the index.
func (*HardlinkIndex) Has ¶ added in v0.5.0
func (idx *HardlinkIndex) Has(inode uint64, device uint64) bool
Has checks wether the link already exist in the index.
func (*HardlinkIndex) Remove ¶ added in v0.5.0
func (idx *HardlinkIndex) Remove(inode uint64, device uint64)
Remove removes a link from the index.
type HardlinkKey ¶ added in v0.5.0
type HardlinkKey struct {
Inode, Device uint64
}
HardlinkKey is a composed key for finding inodes on a specific device.
type ID ¶ added in v0.3.0
type ID [idSize]byte
ID references content within a repository.
func FindLatestSnapshot ¶
func FindLatestSnapshot(ctx context.Context, repo Repository, targets []string, tagLists []TagList, hostname string) (ID, error)
FindLatestSnapshot finds latest snapshot with optional target/directory, tags and hostname filters.
func FindSnapshot ¶
func FindSnapshot(repo Repository, s string) (ID, error)
FindSnapshot takes a string and tries to find a snapshot whose ID matches the string as closely as possible.
func IDFromHash ¶ added in v0.4.0
IDFromHash returns the ID for the hash.
func NewRandomID ¶ added in v0.3.0
func NewRandomID() ID
NewRandomID returns a randomly generated ID. When reading from rand fails, the function panics.
func TestParseID ¶ added in v0.3.0
TestParseID parses s as a ID and panics if that fails.
func (ID) EqualString ¶ added in v0.3.0
EqualString compares this ID to another one, given as a string.
func (ID) MarshalJSON ¶ added in v0.3.0
MarshalJSON returns the JSON encoding of id.
func (*ID) UnmarshalJSON ¶ added in v0.3.0
UnmarshalJSON parses the JSON-encoded data and stores the result in id.
type IDSet ¶ added in v0.3.0
type IDSet map[ID]struct{}
IDSet is a set of IDs.
func (IDSet) Intersect ¶ added in v0.3.0
Intersect returns a new set containing the IDs that are present in both sets.
type IDs ¶ added in v0.3.0
type IDs []ID
IDs is an ordered list of IDs that implements sort.Interface.
type Index ¶ added in v0.3.0
type Index interface { Has(ID, BlobType) bool Lookup(ID, BlobType) ([]PackedBlob, error) Count(BlobType) uint // Each returns a channel that yields all blobs known to the index. When // the context is cancelled, the background goroutine terminates. This // blocks any modification of the index. Each(ctx context.Context) <-chan PackedBlob }
Index keeps track of the blobs are stored within files.
type JSONUnpackedLoader ¶ added in v0.3.0
type JSONUnpackedLoader interface {
LoadJSONUnpacked(context.Context, FileType, ID, interface{}) error
}
JSONUnpackedLoader loads unpacked JSON.
type Lock ¶
type Lock struct { Time time.Time `json:"time"` Exclusive bool `json:"exclusive"` Hostname string `json:"hostname"` Username string `json:"username"` PID int `json:"pid"` UID uint32 `json:"uid,omitempty"` GID uint32 `json:"gid,omitempty"` // contains filtered or unexported fields }
Lock represents a process locking the repository for an operation.
There are two types of locks: exclusive and non-exclusive. There may be many different non-exclusive locks, but at most one exclusive lock, which can only be acquired while no non-exclusive lock is held.
A lock must be refreshed regularly to not be considered stale, this must be triggered by regularly calling Refresh.
func NewExclusiveLock ¶
func NewExclusiveLock(ctx context.Context, repo Repository) (*Lock, error)
NewExclusiveLock returns a new, exclusive lock for the repository. If another lock (normal and exclusive) is already held by another process, ErrAlreadyLocked is returned.
func NewLock ¶
func NewLock(ctx context.Context, repo Repository) (*Lock, error)
NewLock returns a new, non-exclusive lock for the repository. If an exclusive lock is already held by another process, ErrAlreadyLocked is returned.
func (*Lock) Refresh ¶
Refresh refreshes the lock by creating a new file in the backend with a new timestamp. Afterwards the old lock is removed.
type Node ¶
type Node struct { Name string `json:"name"` Type string `json:"type"` Mode os.FileMode `json:"mode,omitempty"` ModTime time.Time `json:"mtime,omitempty"` AccessTime time.Time `json:"atime,omitempty"` ChangeTime time.Time `json:"ctime,omitempty"` UID uint32 `json:"uid"` GID uint32 `json:"gid"` User string `json:"user,omitempty"` Group string `json:"group,omitempty"` Inode uint64 `json:"inode,omitempty"` DeviceID uint64 `json:"device_id,omitempty"` // device id of the file, stat.st_dev Size uint64 `json:"size,omitempty"` Links uint64 `json:"links,omitempty"` LinkTarget string `json:"linktarget,omitempty"` ExtendedAttributes []ExtendedAttribute `json:"extended_attributes,omitempty"` Device uint64 `json:"device,omitempty"` // in case of Type == "dev", stat.st_rdev Content IDs `json:"content"` Subtree *ID `json:"subtree,omitempty"` Error string `json:"error,omitempty"` Path string `json:"-"` }
Node is a file, directory or other item in a backup.
func NodeFromFileInfo ¶
NodeFromFileInfo returns a new node from the given path and FileInfo. It returns the first error that is encountered, together with a node.
func (*Node) CreateAt ¶
func (node *Node) CreateAt(ctx context.Context, path string, repo Repository, idx *HardlinkIndex) error
CreateAt creates the node at the given path and restores all the meta data.
func (Node) GetExtendedAttribute ¶ added in v0.5.0
GetExtendedAttribute gets the extended attribute.
func (*Node) IsNewer ¶ added in v0.3.0
IsNewer returns true of the file has been updated since the last Stat().
func (Node) MarshalJSON ¶
func (Node) RestoreTimestamps ¶
func (*Node) UnmarshalJSON ¶
type PackedBlob ¶ added in v0.3.0
PackedBlob is a blob stored within a file.
type Progress ¶
type Progress struct { OnStart func() OnUpdate ProgressFunc OnDone ProgressFunc // contains filtered or unexported fields }
Progress reports progress on an operation.
func NewProgress ¶
func NewProgress() *Progress
NewProgress returns a new progress reporter. When Start() is called, the function OnStart is executed once. Afterwards the function OnUpdate is called when new data arrives or at least every d interval. The function OnDone is called when Done() is called. Both functions are called synchronously and can use shared state.
type ProgressFunc ¶
ProgressFunc is used to report progress back to the user.
type RandReader ¶ added in v0.3.0
type RandReader struct {
// contains filtered or unexported fields
}
RandReader allows reading from a rand.Rand.
type Repository ¶ added in v0.3.0
type Repository interface { // Backend returns the backend used by the repository Backend() Backend Key() *crypto.Key SetIndex(Index) Index() Index SaveFullIndex(context.Context) error SaveIndex(context.Context) error LoadIndex(context.Context) error Config() Config LookupBlobSize(ID, BlobType) (uint, error) List(context.Context, FileType) <-chan ID ListPack(context.Context, ID) ([]Blob, int64, error) Flush() error SaveUnpacked(context.Context, FileType, []byte) (ID, error) SaveJSONUnpacked(context.Context, FileType, interface{}) (ID, error) LoadJSONUnpacked(context.Context, FileType, ID, interface{}) error LoadAndDecrypt(context.Context, FileType, ID) ([]byte, error) LoadBlob(context.Context, BlobType, ID, []byte) (int, error) SaveBlob(context.Context, BlobType, []byte, ID) (ID, error) LoadTree(context.Context, ID) (*Tree, error) SaveTree(context.Context, *Tree) (ID, error) }
Repository stores data in a backend. It provides high-level functions and transparently encrypts/decrypts data.
type Restorer ¶
type Restorer struct { Error func(dir string, node *Node, err error) error SelectFilter func(item string, dstpath string, node *Node) bool // contains filtered or unexported fields }
Restorer is used to restore a snapshot to a directory.
func NewRestorer ¶
func NewRestorer(repo Repository, id ID) (*Restorer, error)
NewRestorer creates a restorer preloaded with the content from the snapshot id.
type Snapshot ¶
type Snapshot struct { Time time.Time `json:"time"` Parent *ID `json:"parent,omitempty"` Tree *ID `json:"tree"` Paths []string `json:"paths"` Hostname string `json:"hostname,omitempty"` Username string `json:"username,omitempty"` UID uint32 `json:"uid,omitempty"` GID uint32 `json:"gid,omitempty"` Excludes []string `json:"excludes,omitempty"` Tags []string `json:"tags,omitempty"` Original *ID `json:"original,omitempty"` // contains filtered or unexported fields }
Snapshot is the state of a resource at one point in time.
func LoadAllSnapshots ¶
func LoadAllSnapshots(ctx context.Context, repo Repository) (snapshots []*Snapshot, err error)
LoadAllSnapshots returns a list of all snapshots in the repo.
func LoadSnapshot ¶
LoadSnapshot loads the snapshot with the id and returns it.
func NewSnapshot ¶
NewSnapshot returns an initialized snapshot struct for the current user and time.
func TestCreateSnapshot ¶
func TestCreateSnapshot(t testing.TB, repo Repository, at time.Time, depth int, duplication float32) *Snapshot
TestCreateSnapshot creates a snapshot filled with fake data. The fake data is generated deterministically from the timestamp `at`, which is also used as the snapshot's timestamp. The tree's depth can be specified with the parameter depth. The parameter duplication is a probability that the same blob will saved again.
func (*Snapshot) AddTags ¶ added in v0.5.0
AddTags adds the given tags to the snapshots tags, preventing duplicates. It returns true if any changes were made.
func (*Snapshot) HasPaths ¶ added in v0.5.0
HasPaths returns true if the snapshot has all of the paths.
func (*Snapshot) HasTagList ¶ added in v0.7.1
HasTagList returns true if the snapshot satisfies at least one TagList, so there is a TagList in l for which all tags are included in sn.
func (*Snapshot) HasTags ¶ added in v0.3.0
HasTags returns true if the snapshot has all the tags in l.
func (*Snapshot) RemoveTags ¶ added in v0.5.0
RemoveTags removes the given tags from the snapshots tags and returns true if any changes were made.
type Snapshots ¶ added in v0.3.0
type Snapshots []*Snapshot
Snapshots is a list of snapshots.
func ApplyPolicy ¶ added in v0.3.0
func ApplyPolicy(list Snapshots, p ExpirePolicy) (keep, remove Snapshots)
ApplyPolicy returns the snapshots from list that are to be kept and removed according to the policy p. list is sorted in the process.
func FindFilteredSnapshots ¶ added in v0.7.0
func FindFilteredSnapshots(ctx context.Context, repo Repository, host string, tags []TagList, paths []string) Snapshots
FindFilteredSnapshots yields Snapshots filtered from the list of all snapshots.
type TagList ¶ added in v0.7.1
type TagList []string
TagList is a list of tags.
type TagLists ¶ added in v0.7.1
type TagLists []TagList
TagLists consists of several TagList.
Source Files ¶
- backend.go
- backend_find.go
- blob.go
- blob_set.go
- buffer.go
- config.go
- doc.go
- file.go
- find.go
- hardlinks_index.go
- id.go
- ids.go
- idset.go
- lock.go
- lock_unix.go
- node.go
- node_linux.go
- node_unix.go
- node_xattr.go
- progress.go
- progress_unix.go
- rand_reader.go
- readerat.go
- repository.go
- restorer.go
- snapshot.go
- snapshot_find.go
- snapshot_policy.go
- tag_list.go
- testing.go
- tree.go
Directories ¶
Path | Synopsis |
---|---|
Package backend provides local and remote storage for restic repositories.
|
Package backend provides local and remote storage for restic repositories. |
local
Package local implements repository storage in a local directory.
|
Package local implements repository storage in a local directory. |
location
Package location implements parsing the restic repository location from a string.
|
Package location implements parsing the restic repository location from a string. |
sftp
Package sftp implements repository storage in a directory on a remote server via the sftp protocol.
|
Package sftp implements repository storage in a directory on a remote server via the sftp protocol. |
test
Package test contains a test suite with benchmarks for restic backends.
|
Package test contains a test suite with benchmarks for restic backends. |
Package crypto provides all cryptographic operations needed in restic.
|
Package crypto provides all cryptographic operations needed in restic. |
Package debug provides an infrastructure for logging debug information and breakpoints.
|
Package debug provides an infrastructure for logging debug information and breakpoints. |
Package errors provides custom error types used within restic.
|
Package errors provides custom error types used within restic. |
Package filter implements filters for files similar to filepath.Glob, but in contrast to filepath.Glob a pattern may specify directories.
|
Package filter implements filters for files similar to filepath.Glob, but in contrast to filepath.Glob a pattern may specify directories. |
Package fs implements an OS independent abstraction of a file system suitable for backup purposes.
|
Package fs implements an OS independent abstraction of a file system suitable for backup purposes. |
Package index contains various data structures for indexing content in a repository or backend.
|
Package index contains various data structures for indexing content in a repository or backend. |
Package migrations contains migrations that can be applied to a repository and/or backend.
|
Package migrations contains migrations that can be applied to a repository and/or backend. |
Package pack provides functions for combining and parsing pack files.
|
Package pack provides functions for combining and parsing pack files. |
Package pipe implements walking a directory in a deterministic order.
|
Package pipe implements walking a directory in a deterministic order. |
Package repository implements a restic repository on top of a backend.
|
Package repository implements a restic repository on top of a backend. |
Package test provides helper functions for writing tests for restic.
|
Package test provides helper functions for writing tests for restic. |
Package worker implements a worker pool.
|
Package worker implements a worker pool. |