Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareBackup ¶
PrepareBackup sets up the data before backup
Types ¶
type BaseProvider ¶
type BaseProvider struct {
// contains filtered or unexported fields
}
BaseProvider is a struct implementing the Provider interface
func (*BaseProvider) GetBackupDir ¶
func (p *BaseProvider) GetBackupDir() string
GetBackupDir returns the backup directory used by the provider
func (*BaseProvider) GetHandler ¶
func (p *BaseProvider) GetHandler() *handler.Conplicity
GetHandler returns the handler associated with the provider
func (*BaseProvider) GetVolume ¶
func (p *BaseProvider) GetVolume() *volume.Volume
GetVolume returns the volume associated with the provider
func (*BaseProvider) SetVolumeBackupDir ¶
func (p *BaseProvider) SetVolumeBackupDir()
SetVolumeBackupDir sets the backup dir for the volume
type DefaultProvider ¶
type DefaultProvider struct {
*BaseProvider
}
DefaultProvider implements a BaseProvider struct for simple filesystem backups
func (*DefaultProvider) GetName ¶
func (*DefaultProvider) GetName() string
GetName returns the provider name
func (*DefaultProvider) GetPrepareCommand ¶
func (p *DefaultProvider) GetPrepareCommand(mount *types.MountPoint) []string
GetPrepareCommand returns the command to be executed before backup
func (*DefaultProvider) PrepareBackup ¶
func (p *DefaultProvider) PrepareBackup() error
PrepareBackup sets up the data before backup
type MySQLProvider ¶
type MySQLProvider struct {
*BaseProvider
}
MySQLProvider implements a BaseProvider struct for MySQL backups
func (*MySQLProvider) GetBackupDir ¶
func (p *MySQLProvider) GetBackupDir() string
GetBackupDir returns the backup directory used by the provider
func (*MySQLProvider) GetName ¶
func (*MySQLProvider) GetName() string
GetName returns the provider name
func (*MySQLProvider) GetPrepareCommand ¶
func (p *MySQLProvider) GetPrepareCommand(mount *types.MountPoint) []string
GetPrepareCommand returns the command to be executed before backup
type OpenLDAPProvider ¶
type OpenLDAPProvider struct {
*BaseProvider
}
OpenLDAPProvider implements a BaseProvider struct for OpenLDAP backups
func (*OpenLDAPProvider) GetBackupDir ¶
func (p *OpenLDAPProvider) GetBackupDir() string
GetBackupDir returns the backup directory used by the provider
func (*OpenLDAPProvider) GetName ¶
func (p *OpenLDAPProvider) GetName() string
GetName returns the provider name
func (*OpenLDAPProvider) GetPrepareCommand ¶
func (p *OpenLDAPProvider) GetPrepareCommand(mount *types.MountPoint) []string
GetPrepareCommand returns the command to be executed before backup
type PostgreSQLProvider ¶
type PostgreSQLProvider struct {
*BaseProvider
}
PostgreSQLProvider implements a BaseProvider struct for PostgreSQL backups
func (*PostgreSQLProvider) GetBackupDir ¶
func (p *PostgreSQLProvider) GetBackupDir() string
GetBackupDir returns the backup directory used by the provider
func (*PostgreSQLProvider) GetName ¶
func (p *PostgreSQLProvider) GetName() string
GetName returns the provider name
func (*PostgreSQLProvider) GetPrepareCommand ¶
func (p *PostgreSQLProvider) GetPrepareCommand(mount *types.MountPoint) []string
GetPrepareCommand returns the command to be executed before backup
type Provider ¶
type Provider interface { GetName() string GetPrepareCommand(*types.MountPoint) []string GetHandler() *handler.Conplicity GetVolume() *volume.Volume GetBackupDir() string SetVolumeBackupDir() }
A Provider is an interface for providers
func GetProvider ¶
func GetProvider(c *handler.Conplicity, vol *volume.Volume) Provider
GetProvider detects which provider suits the passed volume and returns it