Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
0289e725
Commit
0289e725
authored
Oct 28, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use -mode instead of -snapshot, -suspend and -stop
parent
7d0b305b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
23 deletions
+16
-23
VZDump.pm
PVE/VZDump.pm
+11
-18
vzdump
bin/vzdump
+5
-5
No files found.
PVE/VZDump.pm
View file @
0289e725
...
...
@@ -427,7 +427,7 @@ sub new {
check_bin
('
cstream
');
check_bin
('
ionice
');
if
(
$opts
->
{
snapshot
}
)
{
if
(
$opts
->
{
mode
}
&&
$opts
->
{
mode
}
eq
'
snapshot
'
)
{
check_bin
('
lvcreate
');
check_bin
('
lvs
');
check_bin
('
lvremove
');
...
...
@@ -444,10 +444,6 @@ sub new {
}
}
$opts
->
{
mode
}
=
'
stop
'
if
$opts
->
{
stop
};
$opts
->
{
mode
}
=
'
suspend
'
if
$opts
->
{
suspend
};
$opts
->
{
mode
}
=
'
snapshot
'
if
$opts
->
{
snapshot
};
$opts
->
{
dumpdir
}
=~
s
|/+
$|
|
if
(
$opts
->
{
dumpdir
});
$opts
->
{
tmpdir
}
=~
s
|/+
$|
|
if
(
$opts
->
{
tmpdir
});
...
...
@@ -1048,20 +1044,12 @@ my $confdesc = {
optional
=>
1
,
default
=>
0
,
},
stop
=>
{
type
=>
'
boolean
',
description
=>
"
Stop/Restart VM when running.
",
optional
=>
1
,
},
snapshot
=>
{
type
=>
'
boolean
',
description
=>
"
Try to use (LVM) snapshots when running.
",
optional
=>
1
,
},
suspend
=>
{
type
=>
'
boolean
',
description
=>
"
Suspend/resume VM when running
",
mode
=>
{
type
=>
'
string
',
description
=>
"
Backup mode.
",
optional
=>
1
,
default
=>
'
stop
',
enum
=>
[
'
snapshot
',
'
suspend
',
'
stop
'
],
},
exclude
=>
{
type
=>
'
string
',
format
=>
'
pve-vmid-list
',
...
...
@@ -1136,6 +1124,11 @@ my $confdesc = {
},
};
sub
option_exists
{
my
$key
=
shift
;
return
defined
(
$confdesc
->
{
$key
});
}
# add JSON properties for create and set function
sub
json_config_properties
{
my
$prop
=
shift
;
...
...
bin/vzdump
View file @
0289e725
...
...
@@ -56,7 +56,7 @@ machines (VMs). It basically creates a tar archive of the VM private area,
which also includes the VM configuration files. vzdump currently
supports OpenVZ and QemuServer VMs.
There are several ways to provide consistency:
There are several ways to provide consistency
(option C<mode>)
:
=over 2
...
...
@@ -157,15 +157,15 @@ Simply dump VM 777 - no snapshot, just archive the VM private area and configura
Use rsync and suspend/resume to create an snapshot (minimal downtime).
# vzdump 777 --suspend
# vzdump 777 --
mode
suspend
Backup all VMs and send notification mails to root and admin.
# vzdump --all --suspend --mailto root --mailto admin
# vzdump --all --
mode
suspend --mailto root --mailto admin
Use LVM2 to create snapshots (no downtime).
# vzdump 777 --dumpdir /mnt/backup --snapshot
# vzdump 777 --dumpdir /mnt/backup --
mode
snapshot
Backup more than one VM (selectively)
...
...
@@ -173,7 +173,7 @@ Backup more than one VM (selectively)
Backup all VMs excluding VM 101 and 102
# vzdump --suspend --exclude 101,102
# vzdump --
mode
suspend --exclude 101,102
Restore an OpenVZ machine to VM 600
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment