gophercloud: github.com/rackspace/gophercloud/rackspace/db/v1/backups Index | Files

package backups

import "github.com/rackspace/gophercloud/rackspace/db/v1/backups"

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

Package Files

doc.go requests.go results.go urls.go

func List Uses

func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager

List will list all the saved backups for all database instances.

type Backup Uses

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 Uses

func ExtractBackups(page pagination.Page) ([]Backup, error)

ExtractBackups will retrieve a slice of Backup structs from a paginated collection.

type BackupPage Uses

type BackupPage struct {
    pagination.SinglePageBase
}

BackupPage represents a page of backups.

func (BackupPage) IsEmpty Uses

func (r BackupPage) IsEmpty() (bool, error)

IsEmpty checks whether an BackupPage struct is empty.

type CreateOpts Uses

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 Uses

func (opts CreateOpts) ToBackupCreateMap() (map[string]interface{}, error)

ToBackupCreateMap will create a JSON map for the Create operation.

type CreateOptsBuilder Uses

type CreateOptsBuilder interface {
    ToBackupCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder is the top-level interface for creating JSON maps.

type CreateResult Uses

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

CreateResult represents the result of a create operation.

func Create Uses

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.

func (CreateResult) Extract Uses

func (r CreateResult) Extract() (*Backup, error)

Extract will retrieve a Backup struct from an operation's result.

type DeleteResult Uses

type DeleteResult struct {
    gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation.

func Delete Uses

func Delete(client *gophercloud.ServiceClient, id string) DeleteResult

Delete will permanently delete a backup.

type GetResult Uses

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

GetResult represents the result of a get operation.

func Get Uses

func Get(client *gophercloud.ServiceClient, id string) GetResult

Get will retrieve details for a particular backup based on its unique ID.

func (GetResult) Extract Uses

func (r GetResult) Extract() (*Backup, error)

Extract will retrieve a Backup struct from an operation's result.

type ListOpts Uses

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 Uses

func (opts ListOpts) ToBackupListQuery() (string, error)

ToBackupListQuery converts a ListOpts struct into a query string.

type ListOptsBuilder Uses

type ListOptsBuilder interface {
    ToBackupListQuery() (string, error)
}

ListOptsBuilder is the top-level interface for creating query strings.

type Status Uses

type Status string

Status represents the various states a Backup can be in.

const (
    StatusNew          Status = "NEW"
    StatusBuilding     Status = "BUILDING"
    StatusCompleted    Status = "COMPLETED"
    StatusFailed       Status = "FAILED"
    StatusDeleteFailed Status = "DELETE_FAILED"
)

Enum types for the status.

Package backups imports 8 packages (graph) and is imported by 2 packages. Updated 2018-07-02. Refresh now. Tools for package owners.