Documentation ¶
Overview ¶
package backup handles reading and writing encrypted .tar files from the secretsDirectory to a backupPath using the key backupKey.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NonCanonicalPathError = errors.New("non-canonical file path in archive")
Functions ¶
Types ¶
type FileBackup ¶
type FileBackup struct { SecretsDirectory string BackupPath string BackupKeyPath string Pubkey *[32]byte Chown bool EnforceFS output.Filesystem }
func (*FileBackup) Backup ¶
func (b *FileBackup) Backup() error
Backup loads all files in b.SecretsDirectory, tars, compresses, then encrypts with b.BackupKey The content is written to b.BackupPath
func (*FileBackup) Restore ¶
func (b *FileBackup) Restore(key []byte) error
Restore opens b.BackupPath, decrypts with an unwrapped key and writes contents to b.SecretsDirectory
type WrappedKey ¶
WrappedKey is the JSON-encoded "wrapped key" that a backup is encrypted with.
Click to show internal directories.
Click to hide internal directories.