Documentation ¶
Index ¶
- Constants
- Variables
- func ClearLine() string
- func OpenRepository(opts ResticOptions) (*repository.Repository, error)
- func Print(args ...interface{})
- func PrintProgress(format string, args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func ReadPassword(opts ResticOptions, prompt string) (string, error)
- func ReadPasswordTwice(gopts ResticOptions, prompt1, prompt2 string) (string, error)
- func ReadRepo(opts ResticOptions) (string, error)
- func Verbosef(format string, args ...interface{})
- func Verboseff(format string, args ...interface{})
- func Warnf(format string, args ...interface{})
- type ResticOptions
Constants ¶
const TimeFormat = "2006-01-02 15:04:05"
TimeFormat is the format used for all timestamps printed by restic.
Variables ¶
var DefaultOptions = ResticOptions{ // contains filtered or unexported fields }
Functions ¶
func ClearLine ¶
func ClearLine() string
ClearLine creates a platform dependent string to clear the current line, so it can be overwritten. ANSI sequences are not supported on current windows cmd shell.
func OpenRepository ¶
func OpenRepository(opts ResticOptions) (*repository.Repository, error)
OpenRepository reads the password and opens the repository.
func Print ¶
func Print(args ...interface{})
Print writes the message to the configured stdout stream.
func PrintProgress ¶
func PrintProgress(format string, args ...interface{})
PrintProgress wraps fmt.Printf to handle the difference in writing progress information to terminals and non-terminal stdout
func Printf ¶
func Printf(format string, args ...interface{})
Printf writes the message to the configured stdout stream.
func Println ¶
func Println(args ...interface{})
Println writes the message to the configured stdout stream.
func ReadPassword ¶
func ReadPassword(opts ResticOptions, prompt string) (string, error)
ReadPassword reads the password from a password file, the environment variable RESTIC_PASSWORD or prompts the user.
func ReadPasswordTwice ¶
func ReadPasswordTwice(gopts ResticOptions, prompt1, prompt2 string) (string, error)
ReadPasswordTwice calls ReadPassword two times and returns an error when the passwords don't match.
func ReadRepo ¶
func ReadRepo(opts ResticOptions) (string, error)
func Verbosef ¶
func Verbosef(format string, args ...interface{})
Verbosef calls Printf to write the message when the verbose flag is set.
Types ¶
type ResticOptions ¶
type ResticOptions struct { Repo string RepositoryFile string PasswordFile string PasswordCommand string KeyHint string Quiet bool Verbose int NoLock bool JSON bool CacheDir string NoCache bool CACerts []string TLSClientCert string CleanupCache bool LimitUploadKb int LimitDownloadKb int Password string Options []string // contains filtered or unexported fields }
ResticOptions hold all global options for restic.
Directories ¶
Path | Synopsis |
---|---|
Package backend provides local and remote storage for restic repositories.
|
Package backend provides local and remote storage for restic repositories. |
gs
Package gs provides a restic backend for Google Cloud Storage.
|
Package gs provides a restic backend for Google Cloud Storage. |
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. |
cmd
|
|
rapi
* Restic snapshot related tools * * See https://github.com/rubiojr/rapi/tree/master/docs/tooling
|
* Restic snapshot related tools * * See https://github.com/rubiojr/rapi/tree/master/docs/tooling |
Package crypto provides all cryptographic operations needed in restic.
|
Package crypto provides all cryptographic operations needed in restic. |
index_blobs.go walks restic's repository data dir and adds all the blobs available the pack files found to an index map.
|
index_blobs.go walks restic's repository data dir and adds all the blobs available the pack files found to an index map. |
internal
|
|
archiver
Package archiver contains the code which reads files, splits them into chunks and saves the data to the repository.
|
Package archiver contains the code which reads files, splits them into chunks and saves the data to the repository. |
debug
Package debug provides an infrastructure for logging debug information and breakpoints.
|
Package debug provides an infrastructure for logging debug information and breakpoints. |
errors
Package errors provides custom error types used within restic.
|
Package errors provides custom error types used within restic. |
filter
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. |
fs
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. |
migrations
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. |
restorer
Package restorer contains code to restore data from a repository.
|
Package restorer contains code to restore data from a repository. |
test
Package test provides helper functions for writing tests for restic.
|
Package test provides helper functions for writing tests for restic. |
textfile
Package textfile allows reading files that contain text.
|
Package textfile allows reading files that contain text. |
Package pack provides functions for combining and parsing pack files.
|
Package pack provides functions for combining and parsing pack files. |
Package repository implements a restic repository on top of a backend.
|
Package repository implements a restic repository on top of a backend. |
Package restic is the top level package for the restic backup program, please see https://github.com/restic/restic for more information.
|
Package restic is the top level package for the restic backup program, please see https://github.com/restic/restic for more information. |
Package test provides helper functions for writing tests for restic.
|
Package test provides helper functions for writing tests for restic. |