157 Commits

Author SHA1 Message Date
Dominik Csapak
d1918d1bf6 revert default compress mode for vzdump to 0
rationale is the following:

we had this as default before commit
1ab98f059e1d28e5dd28f326ab371d6d5c1b8bb4

but wrongly documented

since we set the compression mode explicitly via the gui,
we can set the default to 0, which makes some operations more
intuitive (e.g. with the -stdout parameter it makes no sense
to compress it by default)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-12 12:44:44 +02:00
Thomas Lamprecht
7a0a8e67bf vzdump: use sendmail from tools
use the factored out sendmail from the PVE::Tools package

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-04-05 06:30:11 +02:00
Wolfgang Bumiller
e94fa5cbd8 Fix #926: vzdump: config/default key regression
Add a missing defined() so that explicit `0` values in
/etc/vzdump.conf don't get replaced by their defaults.
2016-03-31 17:21:37 +02:00
Fabian Grünbichler
bbcfdc08cc use PVE::Storage::config(), not cfs_read_file() 2016-03-30 10:35:58 +02:00
Wolfgang Bumiller
1ab98f059e vzdump: fix default values
Not all document default values matched their actual
default, fix this by not maintaining two separate lists of
default values.

Note that this changes:
 - the default compression from none to the documented LZO
 - the documented default mode from stop to snapshot
2016-03-04 09:04:06 +01:00
Jean-Francois Dagenais
0568e342e8 vzdump: make sure only DOT pid files excluded
and not files like "acpid"

Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
2016-03-04 09:02:29 +01:00
Wolfgang Bumiller
c6977cf081 vzdump: revert /var/run stdexclude entry to its original
It used to be /var/run/.+pid when we used regular
expressions so now it should be /var/run/?*pid
2016-03-03 10:59:52 +01:00
Wolfgang Bumiller
b1f0911702 vzdump: don't double exclude-paths from the config
The exclude list is built from both the command line
parameters and the config. If no excludes are passed on the
command line we previously copied the defaults to it,
effectively passing them twice.
2016-03-03 09:54:11 +01:00
Wolfgang Bumiller
6368bbd484 vzdump: make exclude-path from config file work again
Call split_args() on the 'exclude-path' option read from
/etc/vzdump.conf

With the move to the generic JSONSchema::parse_config() in
commit cc61ea36 the call to split_args() for 'exclude-path'
was dropped breaking the 'exclude-path' option.
2016-03-03 09:51:05 +01:00
Thomas Lamprecht
10a9a736ed fix PVE::HA use clause so HA resources get registered
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-01-27 17:11:21 +01:00
Dietmar Maurer
ca2605e76f fix bug #719: vzdump - only call cleanup after prepare 2015-10-03 15:30:45 +02:00
Dietmar Maurer
1daa93803f Revert "fix bug #706: Use comma to split vmid list when building the crontab vzdump command"
This reverts commit 4bf3cc21b676157897764246e0da1cb96582e796.

No longer required, because vzdump accepts space separated vmid lists again.
2015-09-21 09:50:34 +02:00
Thomas Lamprecht
2de3ee58c8 Deny stop mode backups from HA managed and enabled services
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-09-20 09:53:12 +02:00
Wolfgang Bumiller
45f16a06e5 vzdump: replace 'find' exclude command switches
We're replacing the use of 'find' in the backup code for
various reasons, so we cannot use find-specific options
anymore. Besides, it's up to the plugin to create the
archive and there's no guarantee using 'find' even makes
sense. Even in the current code it's not being used when
hitting the rsync case anyway.

Now using simple glob patterns as that is more widely
supported.
2015-09-16 11:45:15 +02:00
Emmanuel Kasper
4bf3cc21b6 fix bug #706: Use comma to split vmid list when building the crontab vzdump command 2015-09-10 12:06:19 +02:00
Dietmar Maurer
e1bde2800b vzdump: improve bash completion 2015-09-04 09:12:10 +02:00
Thomas Lamprecht
cc61ea3661 Use JSONSchema to parse vzdump config
Instead of a lot of hardcoded if's use JSONSchema::parse_config to
parse and validate vzdump.conf. To do that $confdesc was extended
to match a valid schema.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-07-30 11:27:49 +02:00
Thomas Lamprecht
4341db1d2f Added functionality do disable temporary a backup job
Added an option to disable a backup job while preserving its
settings. When a job is disabled a '#' is added in front of the vzdump
command in the vzdump.cron file. So the cron job still fires,
but only a comment gets executed. If we would comment out the cron job
a bit more changes to the parser would be needed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-07-27 09:15:09 +02:00
Thomas Lamprecht
778d5b6d4e Added parallel compress support for vzdump with pigz.
Added a vzdump.conf option to controll gzip compression.
When 'pigz' (defaults to 0) is >0, pigz support is enabled.
When the pigz option equals 1 pigz uses #cores/2 threads,
else it spawns N threads. To use it select gzip in the web
interface and set the aproppriate option in /etc/vzdump.conf

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-07-23 06:08:09 +02:00
Dietmar Maurer
8187f6b0ed load new LXC vzdump plugin 2015-04-29 09:11:44 +02:00
Dietmar Maurer
b13a7a31e0 vzdump: improve error message 2015-04-28 08:02:04 +02:00
Dietmar Maurer
dafb62468e remove OpenVZ related code
There is still no OpenVZ for kernel 3.10 or newer, so we remove that code now.
2015-03-27 13:43:59 +01: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
Dietmar Maurer
02e5975925 avoid warning about uninitialized value 2014-11-26 06:55:55 +01:00
Tobias Doerffel
7a5fd13180 VZDump: fixed typo in description for size parameter
Signed-off-by: Tobias Doerffel <tobias.doerffel@ed-chemnitz.de>
2014-11-24 06:35:47 +01:00
Tobias Doerffel
8b4b4860ec VZDump: added email notification setting
It's now possible to make VZDump only send a mail in case of a failure.

Signed-off-by: Tobias Doerffel <tobias.doerffel@ed-chemnitz.de>
2014-11-24 06:35:15 +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
Stanislav German-Evtushenko
4b15265645 GUI: add new email_from option to datacenter.cfg
Signed-off-by: Stanislav German-Evtushenko <ginermail@gmail.com>
2014-09-04 17:16:02 +02:00
Dietmar Maurer
3c963d12cf vzdump: add MIME-Version header
Some clients need this to correctly interpret multipart messages.
2014-02-13 08:26:56 +01:00
Dietmar Maurer
fe6643b6e9 vzdump: remove temporary directories
This bug was introduced with commit a107e264c997825a31904d2ffbed256161561b72
2013-10-04 06:29:17 +02:00
Dietmar Maurer
a107e264c9 bump version to 3.1-16 2013-10-01 10:37:59 +02:00
Dietmar Maurer
8f3315e104 fix bug #456: allow glusterfs as backup storage 2013-09-16 08:13:48 +02:00
Dietmar Maurer
28272ca2c5 bump version to 3.1-11
vzdump: fix hook script environment
2013-09-13 06:55:55 +02:00
Local User
ff00abe656 Pass what storage ID is being used to vzdump hook scripts
Signed-off-by: Mark Casey <markc@unifiedgroup.com>
2013-09-12 06:20:30 +02:00
Dietmar Maurer
84ad4385e0 vzdump: correctly handle maxfiles parameter
Passing value 0 mean unlimited.
2013-09-05 10:59:05 +02:00
Dietmar Maurer
757fd3d5b9 support new qemu vma backup files
bump version to 2.3-1
2012-12-13 12:55:09 +01:00
Dietmar Maurer
c5be0f8c43 also run 'backup-start' hook in snapshot mode 2012-10-12 06:01:42 +02:00
Dietmar Maurer
59af6aee78 fix vzdump parameter parser (allow --stdout) 2012-05-02 11:13:13 +02:00
Dietmar Maurer
8572d646c3 avoid warning if df return negative value for available bytes 2012-04-16 09:40:26 +02:00
Dietmar Maurer
19d5c0f227 fix bug 124: correctly return maxfiles flag 2012-03-23 12:45:10 +01:00
Dietmar Maurer
899b837395 vzdump: add new 'remove' flag to disable automatic file removal
The maxfiles flags is now a storage related flag. So we set that on
the storage definition, and removed it from the scheduled backup GUI.
We use '--remove 0' for 'Backup now', so the user need to remove
old backups himself.
2012-03-23 10:05:14 +01:00
Dietmar Maurer
d93d0459d0 fix bug 101: use run_command to avoid locale errors 2012-03-01 10:46:00 +01:00
Dietmar Maurer
d7550e095e allow to select gzip or lzop in vzdump
lzop is much faster, and we use that by default now.
2012-02-07 10:35:53 +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
61ca4432be fix typo 2011-11-14 14:08:33 +01:00
Dietmar Maurer
5dc86eb891 fix bug 32: correctly parse 'df' output (untaint values) 2011-11-14 09:26:10 +01:00
Dietmar Maurer
31aef76131 cleanup vzdump backup/cron code 2011-10-31 08:47:18 +01:00