Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GroupCmd = &cobra.Command{
Use: "backups",
Short: "Backups commands",
}
View Source
var ListCmd = &cobra.Command{ Use: "list <virtual-machine-id>", Short: "Get backups", Long: "Retrieve backups for a specified virtual machine.\n\nUse this endpoint to view available backup points for VPS data recovery.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSGetBackupsV1WithResponse(context.TODO(), utils.StringToInt(args[0]), listParams(cmd)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var RestoreCmd = &cobra.Command{ Use: "restore <virtual-machine-id> <backup-id>", Short: "Restore backup", Long: "Restore a backup for a specified virtual machine.\n\nThe system will then initiate the restore process, which may take some time depending on the size of the backup.\n\n**All data on the virtual machine will be overwritten with the data from the backup.**\n\nUse this endpoint to recover VPS data from backup points.", Args: cobra.MatchAll(cobra.ExactArgs(2)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSRestoreBackupV1WithResponse(context.TODO(), utils.StringToInt(args[0]), utils.StringToInt(args[1])) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.