Documentation ¶
Overview ¶
Package backups provides information and interaction with the backup API resource in the Rackspace Database service.
A backup is a copy of a database instance that can be used to restore it to some defined point in history.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List will list all the saved backups for all database instances.
Types ¶
type Backup ¶
type Backup struct { Description string ID string InstanceID string `json:"instance_id" mapstructure:"instance_id"` LocationRef string Name string ParentID string `json:"parent_id" mapstructure:"parent_id"` Size float64 Status Status Created time.Time `mapstructure:"-"` Updated time.Time `mapstructure:"-"` Datastore datastores.DatastorePartial }
Backup represents a Backup API resource.
func ExtractBackups ¶
func ExtractBackups(page pagination.Page) ([]Backup, error)
ExtractBackups will retrieve a slice of Backup structs from a paginated collection.
type BackupPage ¶
type BackupPage struct {
pagination.SinglePageBase
}
BackupPage represents a page of backups.
func (BackupPage) IsEmpty ¶
func (r BackupPage) IsEmpty() (bool, error)
IsEmpty checks whether an BackupPage struct is empty.
type CreateOpts ¶
type CreateOpts struct { // [REQUIRED] The name of the backup. The only restriction is the name must // be less than 64 characters long. Name string // [REQUIRED] The ID of the instance being backed up. InstanceID string // [OPTIONAL] A human-readable explanation of the backup. Description string }
CreateOpts is responsible for configuring newly provisioned backups.
func (CreateOpts) ToBackupCreateMap ¶
func (opts CreateOpts) ToBackupCreateMap() (map[string]interface{}, error)
ToBackupCreateMap will create a JSON map for the Create operation.
type CreateOptsBuilder ¶
CreateOptsBuilder is the top-level interface for creating JSON maps.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation.
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult
Create asynchronously creates a new backup for a specified database instance. During the backup process, write access on MyISAM databases will be temporarily disabled; innoDB databases will be unaffected. During this time, you will not be able to add or delete databases or users; nor delete, stop or reboot the instance itself. Only one backup is permitted at once.
Backups are not deleted when database instances are deleted; you must manually delete any backups created using Delete(). Backups are saved to your Cloud Files account in a new container called z_CLOUDDB_BACKUPS. It is strongly recommended you do not alter this container or its contents; usual storage costs apply.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult represents the result of a delete operation.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) DeleteResult
Delete will permanently delete a backup.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) GetResult
Get will retrieve details for a particular backup based on its unique ID.
type ListOpts ¶
type ListOpts struct { // The type of datastore by which to filter. Datastore string `q:"datastore"` }
ListOpts allows you to refine a list search by certain parameters.
func (ListOpts) ToBackupListQuery ¶
ToBackupListQuery converts a ListOpts struct into a query string.
type ListOptsBuilder ¶
ListOptsBuilder is the top-level interface for creating query strings.