Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableGitEncryption ¶ added in v1.3.0
EnableGitEncryption configures the backup git repository to use filters to automatically encrypt any committed backups, using sibylgo as the provider for encryption and decryption.
func SyncToRemote ¶ added in v1.3.0
func SyncToRemote(backupCfg *util.Config, files *util.FileConfig) error
SyncToRemote pushes the backup to the remote location defined in the backup configuration.
Types ¶
type AnsibleCryptor ¶ added in v1.3.0
type AnsibleCryptor struct {
Password string
}
AnsibleCryptor uses the same mechanism as Ansible Vaults to encrypt backup content using a user-provided password.
func (*AnsibleCryptor) DecryptContent ¶ added in v1.3.0
DecryptContent decrypts the backup content using Ansible Vault style encryption with the user-provided password.
func (*AnsibleCryptor) EncryptContent ¶ added in v1.3.0
EncryptContent encrypts the backup content using Ansible Vault style encryption with the user-provided password.
type Backup ¶
Backup denotes a specific backup of the todofile. It doesn't contain the content, but acts as a reference for restoring.
func CheckAndMakeDailyBackup ¶
func CheckAndMakeDailyBackup(files *util.FileConfig) (*Backup, error)
CheckAndMakeDailyBackup creates a daily backup of the todofile if there isn't one already for today.
func ListBackups ¶
ListBackups lists all backups saved for the todoFile. They are ordered from newest to oldest backup.
func Restore ¶
func Restore(files *util.FileConfig, restoreTo *Backup) (*Backup, error)
Restore restores the todoFile to the passed backup and creates a new backup for this restored state. It does not delete any of the intermediate backups that were reverted, so it's still possible to restore a different state.