mirror of https://github.com/jimsalterjrs/sanoid
Merge pull request #210 from phreaker0/special-char-fixes-#2
special char fixes #2
This commit is contained in:
commit
956ccb18c7
9
syncoid
9
syncoid
|
|
@ -189,6 +189,7 @@ sub syncdataset {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
my $newsyncsnapescaped = escapeshellparam($newsyncsnap);
|
||||||
|
|
||||||
# there is currently (2014-09-01) a bug in ZFS on Linux
|
# there is currently (2014-09-01) a bug in ZFS on Linux
|
||||||
# that causes readonly to always show on if it's EVER
|
# that causes readonly to always show on if it's EVER
|
||||||
|
|
@ -257,7 +258,7 @@ sub syncdataset {
|
||||||
# $originaltargetreadonly = getzfsvalue($targethost,$targetfs,$targetisroot,'readonly');
|
# $originaltargetreadonly = getzfsvalue($targethost,$targetfs,$targetisroot,'readonly');
|
||||||
# setzfsvalue($targethost,$targetfs,$targetisroot,'readonly','on');
|
# setzfsvalue($targethost,$targetfs,$targetisroot,'readonly','on');
|
||||||
|
|
||||||
$sendcmd = "$sourcesudocmd $zfscmd send $args{'streamarg'} $sourcefsescaped\@$oldestsnapescaped $sourcefsescaped\@$newsyncsnap";
|
$sendcmd = "$sourcesudocmd $zfscmd send $args{'streamarg'} $sourcefsescaped\@$oldestsnapescaped $sourcefsescaped\@$newsyncsnapescaped";
|
||||||
$pvsize = getsendsize($sourcehost,"$sourcefs\@$oldestsnap","$sourcefs\@$newsyncsnap",$sourceisroot);
|
$pvsize = getsendsize($sourcehost,"$sourcefs\@$oldestsnap","$sourcefs\@$newsyncsnap",$sourceisroot);
|
||||||
$disp_pvsize = readablebytes($pvsize);
|
$disp_pvsize = readablebytes($pvsize);
|
||||||
if ($pvsize == 0) { $disp_pvsize = "UNKNOWN"; }
|
if ($pvsize == 0) { $disp_pvsize = "UNKNOWN"; }
|
||||||
|
|
@ -325,7 +326,7 @@ sub syncdataset {
|
||||||
system ("$targetsudocmd $zfscmd rollback -R $targetfsescaped\@$matchingsnapescaped");
|
system ("$targetsudocmd $zfscmd rollback -R $targetfsescaped\@$matchingsnapescaped");
|
||||||
}
|
}
|
||||||
|
|
||||||
my $sendcmd = "$sourcesudocmd $zfscmd send $args{'streamarg'} $sourcefsescaped\@$matchingsnapescaped $sourcefsescaped\@$newsyncsnap";
|
my $sendcmd = "$sourcesudocmd $zfscmd send $args{'streamarg'} $sourcefsescaped\@$matchingsnapescaped $sourcefsescaped\@$newsyncsnapescaped";
|
||||||
my $recvcmd = "$targetsudocmd $zfscmd receive -F $targetfsescaped";
|
my $recvcmd = "$targetsudocmd $zfscmd receive -F $targetfsescaped";
|
||||||
my $pvsize = getsendsize($sourcehost,"$sourcefs\@$matchingsnap","$sourcefs\@$newsyncsnap",$sourceisroot);
|
my $pvsize = getsendsize($sourcehost,"$sourcefs\@$matchingsnap","$sourcefs\@$newsyncsnap",$sourceisroot);
|
||||||
my $disp_pvsize = readablebytes($pvsize);
|
my $disp_pvsize = readablebytes($pvsize);
|
||||||
|
|
@ -909,7 +910,7 @@ sub getsnaps() {
|
||||||
my $guid = $line;
|
my $guid = $line;
|
||||||
$guid =~ s/^.*\sguid\s*(\d*).*/$1/;
|
$guid =~ s/^.*\sguid\s*(\d*).*/$1/;
|
||||||
my $snap = $line;
|
my $snap = $line;
|
||||||
$snap =~ s/^.*\@(\S*)\s*guid.*$/$1/;
|
$snap =~ s/^.*\@(.*)\tguid.*$/$1/;
|
||||||
$snaps{$type}{$snap}{'guid'}=$guid;
|
$snaps{$type}{$snap}{'guid'}=$guid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -921,7 +922,7 @@ sub getsnaps() {
|
||||||
my $creation = $line;
|
my $creation = $line;
|
||||||
$creation =~ s/^.*\screation\s*(\d*).*/$1/;
|
$creation =~ s/^.*\screation\s*(\d*).*/$1/;
|
||||||
my $snap = $line;
|
my $snap = $line;
|
||||||
$snap =~ s/^.*\@(\S*)\s*creation.*$/$1/;
|
$snap =~ s/^.*\@(.*)\tcreation.*$/$1/;
|
||||||
$snaps{$type}{$snap}{'creation'}=$creation;
|
$snaps{$type}{$snap}{'creation'}=$creation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue