Commit Graph

26 Commits

Author SHA1 Message Date
Aaron Lauterer
5c4da4c3e8 vzdump: make guest include logic testable
As a first step to make the whole guest include logic more testable the
part from the API endpoint has been moved to its own method with as
little changes as possible.

Everything concerning `all` and `exclude` logic is still in the
PVE::VZDump->exec_backup() method.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-06-08 15:54:42 +02:00
Christian Ebner
2424074ee7 vzdump: move code needed for cfs register of vzdump.cron to guest-common
This moves the cfs register code for vzdump.cron to the
pve-guest-common package. Therefore, it relies on the corresponding
patches in pve-guest-common and pve-docs as build dependencies.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-18 08:23:40 +02:00
Stefan Reiter
6cd5ffb06c fix #1594: allow skipping VMIDs on other nodes from API
This was previously gated to CLI only, but it causes a vzdump job
started with the newly introduced "Run Now" button to fail if it
includes VMIDs on other nodes.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-08-14 13:36:08 +02:00
Stefan Reiter
e953f92adf fix #2314: remove GZIP env var
...and replace instead with command line argument.
Avoids a deprecation warning.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-08-08 13:18:45 +02:00
Tim Marx
f337626155 fix #1278 api: add pool backup option
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-06-28 18:05:19 +02:00
Tim Marx
60e049c231 whitespace cleanup
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-06-28 18:01:04 +02:00
Fabian Grünbichler
742d2ad20e fix #1997: set taskid for single-guest backups
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-01-03 09:17:38 +01:00
Dietmar Maurer
989f3c7ead use new PVE::Storage::check_volume_access() 2017-01-18 17:30:40 +01:00
Fabian Grünbichler
6d0507a87a vzdump: move restricted API parameters check
for better visibility and earlier error detection
2016-10-12 17:30:45 +02:00
Fabian Grünbichler
eb2d6fd390 vzdump: document restricted API parameters 2016-10-12 17:30:26 +02:00
Wolfgang Bumiller
403761c43e Fix #1015: vzdump: send email on early errors
VZDump->new() dies when a tmpdir or dumpdir is configured
but does not exist. At this point the error is not being
reported via email.

This also moves the instantiation of VZDump into the worker
since new() can now call sendmail() on error.

Additionally rather than only showing a single error if both
tmpdir and dumpdir don't exist, both are included in the
message.
2016-06-06 13:38:35 +02:00
Fabian Grünbichler
7619e4dd31 add vzdump/extractconfig API path 2016-06-03 12:11:14 +02:00
Fabian Grünbichler
e2a2525e60 VZDump: mark 'size' as deprecated, warn if set
this parameter should be removed in a future release, just
warn and change description for now to avoid breakage.
2016-04-14 10:39:45 +02:00
Dietmar Maurer
eab837c4c4 cleanup vzdump -stop implementation
* do not unlink $pidfile inside stop_running_backups to avoid race conditions
* use pve UPID to save pid (see PVE::Tools::upid_decode)
* allow to pass -stop parameter to nomal backup job
* simple return 'OK' instead of calling exit() inside API call.
* rename stop_all_backups to stop_running_backups
2015-01-20 09:35:01 +01:00
Wolfgang Link
8682f6fcb1 Fix backup failure at shutdown.
This fix include a new function of vzdump.
Now you can call vzdump -stop and the backup will be aborted.
Also if the pve-manager init script stop the process, vzdump -stop will called.

Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
2015-01-20 08:06:59 +01:00
Stefan Priebe
6ec9de4426 VZDump: send an error email in case of lock failure
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2014-10-23 10:57:22 +02:00
Dietmar Maurer
336ec53a48 fix vzdump --exclude-path 2012-05-30 07:25:49 +02:00
Dietmar Maurer
4412265f02 check storage permissions on vzdump API 2012-02-06 11:41:48 +01:00
Dietmar Maurer
98e84b16d5 set permissions for VZDump API 2012-02-06 11:17:42 +01:00
Dietmar Maurer
a7e42354de fix bug 45: skip external VMs 2011-11-28 10:19:48 +01:00
Dietmar Maurer
f4a8bab48f allow exclude-path in /etc/vzdump.conf 2011-11-28 08:14:58 +01:00
Dietmar Maurer
49046e5392 fix bug 39: proxy backup request to correct node 2011-11-17 11:51:47 +01:00
Dietmar Maurer
31aef76131 cleanup vzdump backup/cron code 2011-10-31 08:47:18 +01:00
Dietmar Maurer
ac27b58d10 finnish and cleanup vzdump API 2011-10-25 09:28:55 +02:00
Dietmar Maurer
30edfad922 start backup/restore GUI 2011-10-18 12:49:14 +02:00
Dietmar Maurer
bf58f8ddda plug VZDump into our API 2011-10-14 13:43:06 +02:00