mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Fix backups of directories with spaces
This commit is contained in:
@@ -35,3 +35,5 @@ Files and directories to exclude can be specified for TAR format backups on Linu
|
||||
---- Changes since 1.410 ----
|
||||
Added checkboxes to control if failure of the pre and post-backup commands cause the whole job to be regarded as a failure.
|
||||
Prevent non-level-0 backups and updating of the /etc/dumpdates file for backups of directories that are not filesystem mount points, as this isn't supported by the <tt>dump</tt> command.
|
||||
---- Changes since 1.430 ----
|
||||
Fixed a bug that prevented backups of directories with spaces in their names from working properly on Linux.
|
||||
|
||||
@@ -338,7 +338,8 @@ local $tapecmd = $_[0]->{'multi'} && $_[0]->{'fs'} eq 'tar' ? $multi_cmd :
|
||||
$_[0]->{'notape'} ? undef :
|
||||
$_[0]->{'multi'} ? undef :
|
||||
$_[3] && !$config{'nonewtape'} ? $newtape_cmd : $notape_cmd;
|
||||
local @dirs = split(/\s+/, $_[0]->{'dir'});
|
||||
local @dirs = $_[0]->{'tabs'} ? split(/\t+/, $_[0]->{'dir'})
|
||||
: split(/\s+/, $_[0]->{'dir'});
|
||||
if ($_[0]->{'fs'} eq 'tar') {
|
||||
# tar format backup
|
||||
$cmd = "tar ".($_[0]->{'update'} ? "-u" : "-c")." ".$flag;
|
||||
|
||||
@@ -115,7 +115,9 @@ else {
|
||||
$cmd .= "f '".&date_subs($_[0]->{'file'})."'";
|
||||
}
|
||||
$cmd .= " $_[0]->{'extra'}" if ($_[0]->{'extra'});
|
||||
$cmd .= " ".join(" ", map { "'$_'" } split(/\s+/, $_[0]->{'dir'}));
|
||||
local @dirs = $_[0]->{'tabs'} ? split(/\t+/, $_[0]->{'dir'})
|
||||
: split(/\s+/, $_[0]->{'dir'});
|
||||
$cmd .= " ".join(" ", map { "'$_'" } @dirs);
|
||||
|
||||
&system_logged("sync");
|
||||
sleep(1);
|
||||
|
||||
Reference in New Issue
Block a user