save

package
v0.0.0-...-01ee8fb Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(
	ctx context.Context,
	w io.Writer,
	basePath string,
	exclusions []*regexp.Regexp) (err error)

Given a base directory and a set of exclusions, list the files and directories that would be saved by a backup job with the same info in a human-readable format. Write the output to the supplied writer.

func Save

func Save(
	ctx context.Context,
	dir string,
	exclusions []*regexp.Regexp,
	bucket gcs.Bucket,
	objectNamePrefix string,
	crypter crypto.Crypter,
	existingScores util.StringSet,
	scoreMap state.ScoreMap,
	logger *log.Logger,
	clock timeutil.Clock) (score blob.Score, err error)

Save a backup of the given directory, applying the supplied exclusions and using the supplied score map to avoid reading file content when possible. Return a score for the root of the backup.

The supplied bucket will be used to store objects with the given name prefix. existingScores must contain only scores that are known to exist in the bucket, in hex form. It will be updated as blobs are saved to the bucket.

Types

This section is empty.

Jump to

Keyboard shortcuts

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