Bugs solved
This commit is contained in:
parent
080dd58916
commit
81102c8a27
|
@ -1,4 +1,4 @@
|
|||
vn-vmware (1.0.7) stable; urgency=low
|
||||
vn-vmware (1.0.8) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ use File::Path;
|
|||
use Net::OpenSSH;
|
||||
use Sys::CPU;
|
||||
use Term::ANSIColor;
|
||||
use List::Util qw(min max);
|
||||
|
||||
use constant false => 0;
|
||||
use constant true => 1;
|
||||
|
@ -439,7 +440,7 @@ sub backup_machine() {
|
|||
log_message "Consolidating and removing snapshots.";
|
||||
$vm->RemoveAllSnapshots();
|
||||
|
||||
my $gzip_cpus = int(Sys::CPU::cpu_count()) - 1;
|
||||
my $gzip_cpus = max(1, int(Sys::CPU::cpu_count()) - 1);
|
||||
my $tar_command = "tar -I \"pigz -p $gzip_cpus\" -cf $tar_file -C $local_tmp_dir .";
|
||||
|
||||
log_message "Compressing with Gzip (using $gzip_cpus CPUs) to TAR file: $tar_file";
|
||||
|
@ -472,8 +473,6 @@ sub backup_machine() {
|
|||
sub rotate_backup() {
|
||||
log_message "Rotating '$vm_name' backups.";
|
||||
|
||||
use List::Util qw[min];
|
||||
|
||||
my $local_dir = "$local_backup_dir/$vm_name";
|
||||
|
||||
if ($rotation_days == 0 && $rotation_count == 0) {
|
||||
|
|
Reference in New Issue