Documentation ¶
Index ¶
- Variables
- func CreateSnapshot()
- func Execute()
- func FindStack(sm state.StateManager, snapshot string) (*stack.Stack, error)
- func NewStack(oldStack stack.Stack, name string) *stack.Stack
- func RestoreSnapshot(stateKV state.StateManager, restoreSnapshotName string) error
- type Config
- type CreateClusterSnapshotInput
- type CreateInstanceSnapshotInput
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //CopyRDSSnapshotCmd creates the copy snapshot command. CopyRDSSnapshotCmd = &cobra.Command{ Use: "CopyRDSSnapshot", Aliases: []string{"CopySnapshot"}, Short: "Copies a snapshot for a given DB", Long: "Copies a snapshot for an RDS or Aurora database into a new region", Run: func(cmd *cobra.Command, args []string) { copySnapshot() }, } )
View Source
var ( //CreateRDSSnapshotCmd is the args for creating RDS snapshot call CreateRDSSnapshotCmd = &cobra.Command{ Use: "CreateRDSSnapshot", Aliases: []string{"CreateSnapshot"}, Short: "Creates a snapshot for a given DB", Long: "Creates a snapshot for an RDS or Aurora database", Run: func(cmd *cobra.Command, args []string) { CreateSnapshot() }, } )
View Source
var ( //RestoreRDSSnapshotCmd restores an RDS snapshot RestoreRDSSnapshotCmd = &cobra.Command{ Use: "restoreRDSSnapshot", Aliases: []string{"RestoreSnapshot"}, Short: "Restores an RDS snapshot", Long: "Restores an RDS snapshot", Run: func(cmd *cobra.Command, args []string) { _, sm := GetState() RestoreSnapshot(sm, restoreSnapshotName) }, } )
Functions ¶
func Execute ¶
func Execute()
Execute is the main function for cobra that we will run in our main.go
func RestoreSnapshot ¶
func RestoreSnapshot(stateKV state.StateManager, restoreSnapshotName string) error
RestoreSnapshot is the function that restores a snapshot
Types ¶
type Config ¶
type Config struct { MainRegion string `json:"mainRegion"` BackupRegion string `json:"backupRegion"` StateFileName string `json:"stateFileName"` }
Config tells us our regions and where the state file is
func GetState ¶
func GetState() (Config, state.StateManager)
GetState reads in our statefile and config for future processing
type CreateClusterSnapshotInput ¶
type CreateClusterSnapshotInput struct {
// contains filtered or unexported fields
}
CreateClusterSnapshotInput input for create snapshot for cluster
type CreateInstanceSnapshotInput ¶
type CreateInstanceSnapshotInput struct {
// contains filtered or unexported fields
}
CreateInstanceSnapshotInput input for create snapshot for instance
Click to show internal directories.
Click to hide internal directories.