Documentation ¶
Index ¶
- func Delete(ctx context.Context, backupID, path, password string) error
- func MarshalKopiaSnapshot(snapInfo *SnapshotInfo) (string, error)
- func Read(ctx context.Context, target io.Writer, backupID, path, password string) error
- func ReadFile(ctx context.Context, backupID, target, password string) error
- func SnapshotSource(ctx context.Context, rep repo.RepositoryWriter, u *snapshotfs.Uploader, ...) (string, int64, error)
- type SnapshotInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalKopiaSnapshot ¶
func MarshalKopiaSnapshot(snapInfo *SnapshotInfo) (string, error)
MarshalKopiaSnapshot encodes kopia SnapshotInfo struct into a string
func SnapshotSource ¶
func SnapshotSource( ctx context.Context, rep repo.RepositoryWriter, u *snapshotfs.Uploader, sourceInfo snapshot.SourceInfo, rootDir fs.Entry, description string, ) (string, int64, error)
SnapshotSource creates and uploads a kopia snapshot to the given repository
Types ¶
type SnapshotInfo ¶
type SnapshotInfo struct { // ID is the snapshot ID produced by kopia snapshot operation ID string `json:"id"` // LogicalSize is the sum of cached and hashed file size in bytes LogicalSize int64 `json:"logicalSize"` // PhysicalSize is the uploaded size in bytes PhysicalSize int64 `json:"physicalSize"` }
SnapshotInfo tracks kopia snapshot information produced by a kando command in a phase
func UnmarshalKopiaSnapshot ¶
func UnmarshalKopiaSnapshot(snapInfoJSON string) (SnapshotInfo, error)
UnmarshalKopiaSnapshot decodes a kopia snapshot JSON string into SnapshotInfo struct
func Write ¶
func Write(ctx context.Context, source io.ReadCloser, path, password string) (*SnapshotInfo, error)
Write creates a kopia snapshot from the given reader A virtual directory tree rooted at filepath.Dir(path) is created with a kopia streaming file with filepath.Base(path) as name
func WriteFile ¶
func WriteFile(ctx context.Context, path, sourcePath, password string) (*SnapshotInfo, error)
WriteFile creates a kopia snapshot from the given source file
func (*SnapshotInfo) Validate ¶
func (si *SnapshotInfo) Validate() error
Validate validates SnapshotInfo field values
Click to show internal directories.
Click to hide internal directories.