backups

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteCmd = &cobra.Command{
	Use:   "delete <virtual machine ID> <backup ID>",
	Short: "Delete backup",
	Long:  `This endpoint deletes a specified backup for a virtual machine.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(2)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().VPSDeleteBackupV1WithResponse(context.TODO(), utils.StringToInt(args[0]), utils.StringToInt(args[1]))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var GroupCmd = &cobra.Command{
	Use:   "backups",
	Short: "VM backup management",
	Long:  `Safeguard your data by managing backups. You can list available backups, restore a virtual machine from a backup, or delete backups as needed.`,
}
View Source
var ListCmd = &cobra.Command{
	Use:   "list <virtual machine ID>",
	Short: "Get backup list",
	Long:  `This endpoint retrieves a list of backups for a specified virtual machine.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().VPSGetBackupListV1WithResponse(context.TODO(), utils.StringToInt(args[0]), backupListRequestParameters(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: `This endpoint restores a backup for a specified virtual machine.
The system will then initiate the restore process, which may take some time depending on the size of the backup.

All data on the virtual machine will be overwritten with the data from the backup.`,
	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.

Jump to

Keyboard shortcuts

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