backup

package
v0.0.0-...-1b39373 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2015 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CLUSTERADMIN_DB = "clusteradmin"

Variables

View Source
var CRONInstance *cron.Cron

global cron instance that gets started, stopped, restarted

Functions

func AddSchedule

func AddSchedule(dbConn *sql.DB, s BackupSchedule) (string, error)

func AddStatus

func AddStatus(dbConn *sql.DB, status BackupStatus) (string, error)

func AddStatusClient

func AddStatusClient(ipaddress string, status BackupStatus) (string, error)

called by backup jobs as they execute

func BackupNowClient

func BackupNowClient(ipaddress string, request BackupRequest) (string, error)

called by admin do perform an adhoc backup job

func DeleteSchedule

func DeleteSchedule(dbConn *sql.DB, id string) error

func LoadSchedules

func LoadSchedules() error

func ProvisionBackupJob

func ProvisionBackupJob(dbConn *sql.DB, args *BackupRequest) error

func ReloadClient

func ReloadClient(ipaddress string, sched BackupSchedule) (string, error)

called by admin to add to reload schedules in the backup server

func UpdateSchedule

func UpdateSchedule(dbConn *sql.DB, s BackupSchedule) error

func UpdateStatus

func UpdateStatus(dbConn *sql.DB, status BackupStatus) error

func UpdateStatusClient

func UpdateStatusClient(ipaddress string, status BackupStatus) (string, error)

called by backup jobs as they execute

Types

type BackupProfile

type BackupProfile struct {
	ID   string
	Name string
}

type BackupRequest

type BackupRequest struct {
	ScheduleID    string
	ServerID      string
	ServerName    string
	ProfileName   string
	ServerIP      string
	ContainerName string
}

type BackupSchedule

type BackupSchedule struct {
	ID            string
	ServerID      string
	ServerName    string
	ServerIP      string
	ContainerName string
	ProfileName   string
	Name          string
	Enabled       string
	Minutes       string
	Hours         string
	DayOfMonth    string
	Month         string
	DayOfWeek     string
	UpdateDt      string
}

func GetAllSchedules

func GetAllSchedules(dbConn *sql.DB, containerid string) ([]BackupSchedule, error)

func GetSchedule

func GetSchedule(dbConn *sql.DB, id string) (BackupSchedule, error)

func GetSchedules

func GetSchedules(dbConn *sql.DB) ([]BackupSchedule, error)

type BackupStatus

type BackupStatus struct {
	ID            string
	ContainerName string
	StartTime     string
	BackupName    string
	ProfileName   string
	ServerName    string
	ServerIP      string
	ScheduleID    string
	Path          string
	ElapsedTime   string
	BackupSize    string
	Status        string
	UpdateDt      string
}

func GetAllStatus

func GetAllStatus(dbConn *sql.DB, scheduleid string) ([]BackupStatus, error)

func GetStatus

func GetStatus(dbConn *sql.DB, id string) (BackupStatus, error)

type Command

type Command struct {
	Output string
}

func (*Command) AddStatus

func (t *Command) AddStatus(status *BackupStatus, reply *Command) error

called by backup jobs as they execute

func (*Command) BackupNow

func (t *Command) BackupNow(args *BackupRequest, reply *Command) error

called by admin do perform an adhoc backup job

func (*Command) Reload

func (t *Command) Reload(schedule *BackupSchedule, reply *Command) error

called by admin to cause a reload of the cron jobs

func (*Command) UpdateStatus

func (t *Command) UpdateStatus(status *BackupStatus, reply *Command) error

called by backup jobs as they execute

type DefaultJob

type DefaultJob struct {
	// contains filtered or unexported fields
}

func (DefaultJob) Run

func (t DefaultJob) Run()

this is the func that implements the cron Job interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL