Documentation
¶
Overview ¶
Package restore manages restoring filesystem snapshots.
Index ¶
- type FilesystemOutput
- func (o *FilesystemOutput) BeginDirectory(ctx context.Context, relativePath string, e fs.Directory) error
- func (o *FilesystemOutput) Close(ctx context.Context) error
- func (o *FilesystemOutput) CreateSymlink(ctx context.Context, relativePath string, e fs.Symlink) error
- func (o *FilesystemOutput) FinishDirectory(ctx context.Context, relativePath string, e fs.Directory) error
- func (o *FilesystemOutput) Parallelizable() bool
- func (o *FilesystemOutput) WriteFile(ctx context.Context, relativePath string, f fs.File) error
- type Options
- type Output
- type Stats
- type TarOutput
- func (o *TarOutput) BeginDirectory(ctx context.Context, relativePath string, d fs.Directory) error
- func (o *TarOutput) Close(ctx context.Context) error
- func (o *TarOutput) CreateSymlink(ctx context.Context, relativePath string, l fs.Symlink) error
- func (o *TarOutput) FinishDirectory(ctx context.Context, relativePath string, e fs.Directory) error
- func (o *TarOutput) Parallelizable() bool
- func (o *TarOutput) WriteFile(ctx context.Context, relativePath string, f fs.File) error
- type ZipOutput
- func (o *ZipOutput) BeginDirectory(ctx context.Context, relativePath string, e fs.Directory) error
- func (o *ZipOutput) Close(ctx context.Context) error
- func (o *ZipOutput) CreateSymlink(ctx context.Context, relativePath string, e fs.Symlink) error
- func (o *ZipOutput) FinishDirectory(ctx context.Context, relativePath string, e fs.Directory) error
- func (o *ZipOutput) Parallelizable() bool
- func (o *ZipOutput) WriteFile(ctx context.Context, relativePath string, f fs.File) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilesystemOutput ¶
type FilesystemOutput struct {
// TargetPath for restore.
TargetPath string
// If a directory already exists, overwrite the directory.
OverwriteDirectories bool
// Indicate whether or not to overwrite existing files. When set to false,
// the copier does not modify already existing files and returns an error
// instead.
OverwriteFiles bool
// IgnorePermissionErrors causes restore to ignore errors due to invalid permissions.
IgnorePermissionErrors bool
// SkipOwners when set to true causes restore to skip restoring owner information.
SkipOwners bool
// SkipPermissions when set to true causes restore to skip restoring permission information.
SkipPermissions bool
// SkipTimes when set to true causes restore to skip restoring modification times.
SkipTimes bool
}
FilesystemOutput contains the options for outputting a file system tree.
func (*FilesystemOutput) BeginDirectory ¶
func (o *FilesystemOutput) BeginDirectory(ctx context.Context, relativePath string, e fs.Directory) error
BeginDirectory implements restore.Output interface.
func (*FilesystemOutput) Close ¶
func (o *FilesystemOutput) Close(ctx context.Context) error
Close implements restore.Output interface.
func (*FilesystemOutput) CreateSymlink ¶
func (o *FilesystemOutput) CreateSymlink(ctx context.Context, relativePath string, e fs.Symlink) error
CreateSymlink implements restore.Output interface.
func (*FilesystemOutput) FinishDirectory ¶
func (o *FilesystemOutput) FinishDirectory(ctx context.Context, relativePath string, e fs.Directory) error
FinishDirectory implements restore.Output interface.
func (*FilesystemOutput) Parallelizable ¶ added in v0.7.3
func (o *FilesystemOutput) Parallelizable() bool
Parallelizable implements restore.Output interface.
type Output ¶
type Output interface {
Parallelizable() bool
BeginDirectory(ctx context.Context, relativePath string, e fs.Directory) error
FinishDirectory(ctx context.Context, relativePath string, e fs.Directory) error
WriteFile(ctx context.Context, relativePath string, e fs.File) error
CreateSymlink(ctx context.Context, relativePath string, e fs.Symlink) error
Close(ctx context.Context) error
}
Output encapsulates output for restore operation.
type Stats ¶
type Stats struct {
RestoredTotalFileSize int64
EnqueuedTotalFileSize int64
RestoredFileCount int32
RestoredDirCount int32
RestoredSymlinkCount int32
EnqueuedFileCount int32
EnqueuedDirCount int32
EnqueuedSymlinkCount int32
}
Stats represents restore statistics.
type TarOutput ¶
type TarOutput struct {
// contains filtered or unexported fields
}
TarOutput contains the options for outputting a file system tree to a tar or .tar.gz file.
func NewTarOutput ¶
func NewTarOutput(w io.WriteCloser) *TarOutput
NewTarOutput creates new tar writer output.
func (*TarOutput) BeginDirectory ¶
BeginDirectory implements restore.Output interface.
func (*TarOutput) CreateSymlink ¶
CreateSymlink implements restore.Output interface.
func (*TarOutput) FinishDirectory ¶
FinishDirectory implements restore.Output interface.
func (*TarOutput) Parallelizable ¶ added in v0.7.3
Parallelizable implements restore.Output interface.
type ZipOutput ¶
type ZipOutput struct {
// contains filtered or unexported fields
}
ZipOutput contains the options for outputting a file system tree to a zip file.
func NewZipOutput ¶
func NewZipOutput(w io.WriteCloser, method uint16) *ZipOutput
NewZipOutput creates new zip writer output.
func (*ZipOutput) BeginDirectory ¶
BeginDirectory implements restore.Output interface.
func (*ZipOutput) CreateSymlink ¶
CreateSymlink implements restore.Output interface.
func (*ZipOutput) FinishDirectory ¶
FinishDirectory implements restore.Output interface.
func (*ZipOutput) Parallelizable ¶ added in v0.7.3
Parallelizable implements restore.Output interface.