Documentation
¶
Overview ¶
Package backup owns the portable, verified suga data backup archive format.
Index ¶
Constants ¶
View Source
const FormatVersion = 1
Variables ¶
This section is empty.
Functions ¶
func ToolBodyCheck ¶
ToolBodyCheck verifies the installed session files against the installed ledger, the same check as `suga data bodies --check`, so a restore that did not bring a tool body file back is reported right away.
Types ¶
type File ¶
type File struct {
Path string `json:"path"`
// Category marks the files that are not ordinary data trees; tool body files
// carry categoryToolBodies so the spill accounting can leave them out.
Category string `json:"category,omitempty"`
Size int64 `json:"size"`
SHA256 string `json:"sha256"`
Source string `json:"-"`
}
type Manifest ¶
type Manifest struct {
FormatVersion int `json:"format_version"`
CreatedAt time.Time `json:"created_at"`
SugaVersion string `json:"suga_version"`
Files []File `json:"files"`
Spill SpillInfo `json:"spill"`
// ToolBodies counts the session files that hold moved tool result bodies.
// They are always included, unlike spill: a stub in the ledger only names an
// offset in its file, so the file is the only copy of the body.
ToolBodies ToolBodiesInfo `json:"tool_bodies"`
// Images counts the session image files the backup always carries
// (sessions/<id>/images/, design 0.3).
Images SessionImagesInfo `json:"session_images"`
}
type SessionImagesInfo ¶
SessionImagesInfo counts the session image files a backup carries.
type ToolBodiesInfo ¶
Click to show internal directories.
Click to hide internal directories.