Documentation ¶
Index ¶
- Constants
- Variables
- func OpenRepository(ctx context.Context, opts RepositoryOptions) (*repository.Repository, error)
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func ReadRepo(opts RepositoryOptions) (string, error)
- func Verbosef(format string, args ...interface{})
- func Verboseff(format string, args ...interface{})
- func Warnf(format string, args ...interface{})
- type RepositoryOptions
Constants ¶
View Source
const TimeFormat = "2006-01-02 15:04:05"
TimeFormat is the format used for all timestamps printed by restic.
Variables ¶
View Source
var DefaultOptions = RepositoryOptions{ Stdout: os.Stdout, Stderr: os.Stderr, }
Functions ¶
func OpenRepository ¶
func OpenRepository(ctx context.Context, opts RepositoryOptions) (*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 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 ReadRepo ¶
func ReadRepo(opts RepositoryOptions) (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 RepositoryOptions ¶
type RepositoryOptions struct { Repo string RepositoryFile string PasswordFile string PasswordCommand string KeyHint string Quiet bool Verbose int NoLock bool JSON bool CacheDir string NoCache bool CleanupCache bool Compression repository.CompressionMode PackSize uint backend.TransportOptions limiter.Limits Password string Stdout io.Writer Stderr io.Writer // verbosity is set as follows: // 0 means: don't print any messages except errors, this is used when --quiet is specified // 1 is the default: print essential messages // 2 means: print more messages, report minor things, this is used when --verbose is specified // 3 means: print very detailed debug messages, this is used when --verbose=2 is specified Verbosity uint Options []string Extended options.Options // contains filtered or unexported fields }
RepositoryOptions 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. |
sema
Package sema implements semaphores.
|
Package sema implements semaphores. |
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. |
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. |
Click to show internal directories.
Click to hide internal directories.