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
bfb899cf
Commit
bfb899cf
authored
Apr 29, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load new LXC vzdump plugin
parent
4cae76c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
9 deletions
+30
-9
VZDump.pm
PVE/VZDump.pm
+30
-9
No files found.
PVE/VZDump.pm
View file @
bfb899cf
...
...
@@ -28,15 +28,19 @@ my $logdir = '/var/log/vzdump';
my
@plugins
=
qw()
;
# Load available plugins
my
$pveplug
=
"
/usr/share/perl5/PVE/VZDump/QemuServer.pm
";
if
(
-
f
$pveplug
)
{
eval
{
require
$pveplug
;
};
if
(
!
$@
)
{
PVE::VZDump::
QemuServer
->
import
();
push
@plugins
,
"
PVE::VZDump::QemuServer
";
}
else
{
warn
$@
;
}
my
@pve_vzdump_classes
=
qw(PVE::VZDump::QemuServer PVE::VZDump::LXC)
;
foreach
my
$plug
(
@pve_vzdump_classes
)
{
my
$filename
=
"
/usr/share/perl5/
$plug
.pm
";
$filename
=~
s!::!/!g
;
if
(
-
f
$filename
)
{
eval
{
require
$filename
;
};
if
(
!
$@
)
{
$plug
->
import
();
push
@plugins
,
$plug
;
}
else
{
warn
$@
;
}
}
}
# helper functions
...
...
@@ -849,12 +853,29 @@ sub exec_backup_task {
$self
->
run_hook_script
('
backup-start
',
$task
,
$logfd
);
if
(
$vmtype
eq
'
lxc
')
{
# pre-suspend rsync
$plugin
->
copy_data_phase1
(
$task
,
$vmid
);
}
debugmsg
('
info
',
"
suspend vm
",
$logfd
);
$vmstoptime
=
time
();
$self
->
run_hook_script
('
pre-stop
',
$task
,
$logfd
);
$plugin
->
suspend_vm
(
$task
,
$vmid
);
$cleanup
->
{
resume
}
=
1
;
if
(
$vmtype
eq
'
lxc
')
{
# post-suspend rsync
$plugin
->
copy_data_phase2
(
$task
,
$vmid
);
debugmsg
('
info
',
"
resume vm
",
$logfd
);
$cleanup
->
{
resume
}
=
0
;
$self
->
run_hook_script
('
pre-restart
',
$task
,
$logfd
);
$plugin
->
resume_vm
(
$task
,
$vmid
);
my
$delay
=
time
()
-
$vmstoptime
;
debugmsg
('
info
',
"
vm is online again after
$delay
seconds
",
$logfd
);
}
}
elsif
(
$mode
eq
'
snapshot
')
{
$self
->
run_hook_script
('
backup-start
',
$task
,
$logfd
);
...
...
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