Documentation ¶
Index ¶
- type Options
- type Service
- func (s *Service) Backup(ctx context.Context, node *entity.Node) entity.BackupResult
- func (s *Service) Cleanup(ctx context.Context, node *entity.Node, snapshotTag string) entity.CleanupResult
- func (s *Service) CleanupExpiredBackups(ctx context.Context, node *entity.Node, now time.Time) ([]entity.RemoteBackup, error)
- func (s *Service) Healthcheck(ctx context.Context, node *entity.Node) error
- func (s *Service) ListExpiredBackups(ctx context.Context, node *entity.Node, now time.Time) ([]entity.RemoteBackup, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Scylladb snapshot tag. // If empty, the snapshot tag is generated using current date and a hostname. SnapshotTag string `yaml:"snapshotTag"` // Where to store a backup on a database host before uploading to s3 LocalPath string `yaml:"localPath"` // A list of keyspaces to back up. // Empty means all keyspaces. Keyspaces []string // Turns off upload to a remote storage DisableUpload bool `yaml:"disableUpload"` // Should local directories be cleaned up after uploading to remote storage CleanupLocal bool `yaml:"cleanupLocal"` // Should the expired backups be removed from s3 when creating a new backup CleanupRemote bool `yaml:"cleanupRemote"` // How long should the backups live in remote storage Retention time.Duration // Settings for compress backup Archive entity.Archive }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a backup management service. It operates on a single node.
func NewService ¶
func (*Service) Backup ¶
Backup creates a database backup, uploads it to remote storage, and cleans up temporary files
func (*Service) Cleanup ¶
func (s *Service) Cleanup(ctx context.Context, node *entity.Node, snapshotTag string) entity.CleanupResult
Cleanup removes temporary files on database node, as well as expired backups from this node in remote storage.
func (*Service) CleanupExpiredBackups ¶
func (s *Service) CleanupExpiredBackups( ctx context.Context, node *entity.Node, now time.Time, ) ([]entity.RemoteBackup, error)
CleanupExpiredBackups removes expired backups from a node in remote storage.
func (*Service) Healthcheck ¶
Healthcheck ensures the directories for backup exist on a node
Click to show internal directories.
Click to hide internal directories.