|
|
@ -56,6 +56,8 @@ $opts{debug} = 0; |
|
|
|
$opts{keeplock} = 0; |
|
|
|
$opts{keeplock} = 0; |
|
|
|
# Should we try to create LVM snapshots during the dump ? |
|
|
|
# Should we try to create LVM snapshots during the dump ? |
|
|
|
$opts{snapshot} = 1; |
|
|
|
$opts{snapshot} = 1; |
|
|
|
|
|
|
|
# Should we pause the VM during the backup if we cannot take a snapshot ? |
|
|
|
|
|
|
|
$opts{offline} = 1; |
|
|
|
# Libvirt URI to connect to |
|
|
|
# Libvirt URI to connect to |
|
|
|
@connect = (); |
|
|
|
@connect = (); |
|
|
|
# Compression used with the dump action (the compression is done on the fly) |
|
|
|
# Compression used with the dump action (the compression is done on the fly) |
|
|
@ -107,6 +109,7 @@ GetOptions( |
|
|
|
"unlock" => \$opts{unlock}, |
|
|
|
"unlock" => \$opts{unlock}, |
|
|
|
"connect=s" => \@connect, |
|
|
|
"connect=s" => \@connect, |
|
|
|
"snapshot!" => \$opts{snapshot}, |
|
|
|
"snapshot!" => \$opts{snapshot}, |
|
|
|
|
|
|
|
"offline!" => \$opts{offline}, |
|
|
|
"compress:s" => \$opts{compress}, |
|
|
|
"compress:s" => \$opts{compress}, |
|
|
|
"exclude=s" => \@excludes, |
|
|
|
"exclude=s" => \@excludes, |
|
|
|
"blocksize=s" => \$opts{blocksize}, |
|
|
|
"blocksize=s" => \$opts{blocksize}, |
|
|
@ -457,6 +460,11 @@ sub prepare_backup{ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# Are offline backups allowed ? |
|
|
|
|
|
|
|
elsif (!$opts{offline}){ |
|
|
|
|
|
|
|
run_cleanup(); |
|
|
|
|
|
|
|
die "\nOffline backups disabled, sorry, I cannot continue\n"; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sub run_dump{ |
|
|
|
sub run_dump{ |
|
|
|