vzdump

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Compress_0    Compress = "0"
	Compress_1    Compress = "1"
	Compress_GZIP Compress = "gzip"
	Compress_LZO  Compress = "lzo"
	Compress_ZSTD Compress = "zstd"

	Mailnotification_ALWAYS  Mailnotification = "always"
	Mailnotification_FAILURE Mailnotification = "failure"

	Mode_SNAPSHOT Mode = "snapshot"
	Mode_SUSPEND  Mode = "suspend"
	Mode_STOP     Mode = "stop"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, req CreateRequest) (string, error)

Create Create backup.

func (*Client) Defaults

func (c *Client) Defaults(ctx context.Context, req DefaultsRequest) (DefaultsResponse, error)

Defaults Get the currently configured vzdump defaults.

func (*Client) Extractconfig

func (c *Client) Extractconfig(ctx context.Context, req ExtractconfigRequest) (string, error)

Extractconfig Extract configuration from vzdump backup archive.

type Compress added in v0.0.15

type Compress string

func PtrCompress added in v0.0.15

func PtrCompress(i Compress) *Compress

type CreateRequest

type CreateRequest struct {

	// The following parameters are optional
	All              *util.PVEBool     `url:"all,omitempty" json:"all,omitempty"`                           // Backup all known guest systems on this host.
	Bwlimit          *int              `url:"bwlimit,omitempty" json:"bwlimit,omitempty"`                   // Limit I/O bandwidth (KBytes per second).
	Compress         *Compress         `url:"compress,omitempty" json:"compress,omitempty"`                 // Compress dump file.
	Dumpdir          *string           `url:"dumpdir,omitempty" json:"dumpdir,omitempty"`                   // Store resulting files to specified directory.
	Exclude          *string           `url:"exclude,omitempty" json:"exclude,omitempty"`                   // Exclude specified guest systems (assumes --all)
	ExcludePath      *string           `url:"exclude-path,omitempty" json:"exclude-path,omitempty"`         // Exclude certain files/directories (shell globs). Paths starting with '/' are anchored to the container's root, other paths match relative to each subdirectory.
	Ionice           *int              `url:"ionice,omitempty" json:"ionice,omitempty"`                     // Set CFQ ionice priority.
	Lockwait         *int              `url:"lockwait,omitempty" json:"lockwait,omitempty"`                 // Maximal time to wait for the global lock (minutes).
	Mailnotification *Mailnotification `url:"mailnotification,omitempty" json:"mailnotification,omitempty"` // Specify when to send an email
	Mailto           *string           `url:"mailto,omitempty" json:"mailto,omitempty"`                     // Comma-separated list of email addresses or users that should receive email notifications.
	Maxfiles         *int              `url:"maxfiles,omitempty" json:"maxfiles,omitempty"`                 // Deprecated: use 'prune-backups' instead. Maximal number of backup files per guest system.
	Mode             *Mode             `url:"mode,omitempty" json:"mode,omitempty"`                         // Backup mode.
	Node             *string           `url:"node,omitempty" json:"node,omitempty"`                         // Only run if executed on this node.
	NotesTemplate    *string           `url:"notes-template,omitempty" json:"notes-template,omitempty"`     // Template string for generating notes for the backup(s). It can contain variables which will be replaced by their values. Currently supported are {{cluster}}, {{guestname}}, {{node}}, and {{vmid}}, but more might be added in the future. Needs to be a single line, newline and backslash need to be escaped as '\n' and '\\' respectively.
	Performance      *string           `url:"performance,omitempty" json:"performance,omitempty"`           // Other performance-related settings.
	Pigz             *int              `url:"pigz,omitempty" json:"pigz,omitempty"`                         // Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.
	Pool             *string           `url:"pool,omitempty" json:"pool,omitempty"`                         // Backup all known guest systems included in the specified pool.
	Protected        *util.PVEBool     `url:"protected,omitempty" json:"protected,omitempty"`               // If true, mark backup(s) as protected.
	PruneBackups     *string           `url:"prune-backups,omitempty" json:"prune-backups,omitempty"`       // Use these retention options instead of those from the storage configuration.
	Quiet            *util.PVEBool     `url:"quiet,omitempty" json:"quiet,omitempty"`                       // Be quiet.
	Remove           *util.PVEBool     `url:"remove,omitempty" json:"remove,omitempty"`                     // Prune older backups according to 'prune-backups'.
	Script           *string           `url:"script,omitempty" json:"script,omitempty"`                     // Use specified hook script.
	Stdexcludes      *util.PVEBool     `url:"stdexcludes,omitempty" json:"stdexcludes,omitempty"`           // Exclude temporary files and logs.
	Stdout           *util.PVEBool     `url:"stdout,omitempty" json:"stdout,omitempty"`                     // Write tar to stdout, not to a file.
	Stop             *util.PVEBool     `url:"stop,omitempty" json:"stop,omitempty"`                         // Stop running backup jobs on this host.
	Stopwait         *int              `url:"stopwait,omitempty" json:"stopwait,omitempty"`                 // Maximal time to wait until a guest system is stopped (minutes).
	Storage          *string           `url:"storage,omitempty" json:"storage,omitempty"`                   // Store resulting file to this storage.
	Tmpdir           *string           `url:"tmpdir,omitempty" json:"tmpdir,omitempty"`                     // Store temporary files to specified directory.
	Vmid             *string           `url:"vmid,omitempty" json:"vmid,omitempty"`                         // The ID of the guest system you want to backup.
	Zstd             *int              `url:"zstd,omitempty" json:"zstd,omitempty"`                         // Zstd threads. N=0 uses half of the available cores, N>0 uses N as thread count.
}

type DefaultsRequest

type DefaultsRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.

	// The following parameters are optional
	Storage *string `url:"storage,omitempty" json:"storage,omitempty"` // The storage identifier.
}

type DefaultsResponse

type DefaultsResponse struct {

	// The following parameters are optional
	All              *util.PVEBool     `url:"all,omitempty" json:"all,omitempty"`                           // Backup all known guest systems on this host.
	Bwlimit          *int              `url:"bwlimit,omitempty" json:"bwlimit,omitempty"`                   // Limit I/O bandwidth (KBytes per second).
	Compress         *Compress         `url:"compress,omitempty" json:"compress,omitempty"`                 // Compress dump file.
	Dumpdir          *string           `url:"dumpdir,omitempty" json:"dumpdir,omitempty"`                   // Store resulting files to specified directory.
	Exclude          *string           `url:"exclude,omitempty" json:"exclude,omitempty"`                   // Exclude specified guest systems (assumes --all)
	ExcludePath      *string           `url:"exclude-path,omitempty" json:"exclude-path,omitempty"`         // Exclude certain files/directories (shell globs). Paths starting with '/' are anchored to the container's root, other paths match relative to each subdirectory.
	Ionice           *int              `url:"ionice,omitempty" json:"ionice,omitempty"`                     // Set CFQ ionice priority.
	Lockwait         *int              `url:"lockwait,omitempty" json:"lockwait,omitempty"`                 // Maximal time to wait for the global lock (minutes).
	Mailnotification *Mailnotification `url:"mailnotification,omitempty" json:"mailnotification,omitempty"` // Specify when to send an email
	Mailto           *string           `url:"mailto,omitempty" json:"mailto,omitempty"`                     // Comma-separated list of email addresses or users that should receive email notifications.
	Maxfiles         *int              `url:"maxfiles,omitempty" json:"maxfiles,omitempty"`                 // Deprecated: use 'prune-backups' instead. Maximal number of backup files per guest system.
	Mode             *Mode             `url:"mode,omitempty" json:"mode,omitempty"`                         // Backup mode.
	Node             *string           `url:"node,omitempty" json:"node,omitempty"`                         // Only run if executed on this node.
	NotesTemplate    *string           `url:"notes-template,omitempty" json:"notes-template,omitempty"`     // Template string for generating notes for the backup(s). It can contain variables which will be replaced by their values. Currently supported are {{cluster}}, {{guestname}}, {{node}}, and {{vmid}}, but more might be added in the future. Needs to be a single line, newline and backslash need to be escaped as '\n' and '\\' respectively.
	Performance      *string           `url:"performance,omitempty" json:"performance,omitempty"`           // Other performance-related settings.
	Pigz             *int              `url:"pigz,omitempty" json:"pigz,omitempty"`                         // Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.
	Pool             *string           `url:"pool,omitempty" json:"pool,omitempty"`                         // Backup all known guest systems included in the specified pool.
	Protected        *util.PVEBool     `url:"protected,omitempty" json:"protected,omitempty"`               // If true, mark backup(s) as protected.
	PruneBackups     *string           `url:"prune-backups,omitempty" json:"prune-backups,omitempty"`       // Use these retention options instead of those from the storage configuration.
	Quiet            *util.PVEBool     `url:"quiet,omitempty" json:"quiet,omitempty"`                       // Be quiet.
	Remove           *util.PVEBool     `url:"remove,omitempty" json:"remove,omitempty"`                     // Prune older backups according to 'prune-backups'.
	Script           *string           `url:"script,omitempty" json:"script,omitempty"`                     // Use specified hook script.
	Stdexcludes      *util.PVEBool     `url:"stdexcludes,omitempty" json:"stdexcludes,omitempty"`           // Exclude temporary files and logs.
	Stop             *util.PVEBool     `url:"stop,omitempty" json:"stop,omitempty"`                         // Stop running backup jobs on this host.
	Stopwait         *int              `url:"stopwait,omitempty" json:"stopwait,omitempty"`                 // Maximal time to wait until a guest system is stopped (minutes).
	Storage          *string           `url:"storage,omitempty" json:"storage,omitempty"`                   // Store resulting file to this storage.
	Tmpdir           *string           `url:"tmpdir,omitempty" json:"tmpdir,omitempty"`                     // Store temporary files to specified directory.
	Vmid             *string           `url:"vmid,omitempty" json:"vmid,omitempty"`                         // The ID of the guest system you want to backup.
	Zstd             *int              `url:"zstd,omitempty" json:"zstd,omitempty"`                         // Zstd threads. N=0 uses half of the available cores, N>0 uses N as thread count.
}

type ExtractconfigRequest

type ExtractconfigRequest struct {
	Node   string `url:"node" json:"node"`     // The cluster node name.
	Volume string `url:"volume" json:"volume"` // Volume identifier

}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type Mailnotification added in v0.0.15

type Mailnotification string

func PtrMailnotification added in v0.0.15

func PtrMailnotification(i Mailnotification) *Mailnotification

type Mode added in v0.0.15

type Mode string

func PtrMode added in v0.0.15

func PtrMode(i Mode) *Mode

Jump to

Keyboard shortcuts

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