Skip to content

Commit 5a945f3

Browse files
author
Marius Burkard
committed
- fixed mysql command for backup restore
1 parent 80198b3 commit 5a945f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/plugins-available/backup_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function backup_action($action_name, $data) {
129129
//$db_name = $parts[1];
130130
preg_match('@^db_(.+)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql\.gz$@', $backup['filename'], $matches);
131131
$db_name = $matches[1];
132-
$command = "gunzip --stdout ".escapeshellarg($backup_dir.'/'.$backup['filename'])." | mysql -h '".escapeshellarg($clientdb_host)."' -u '".escapeshellarg($clientdb_user)."' -p'".escapeshellarg($clientdb_password)."' '".$db_name."'";
132+
$command = "gunzip --stdout ".escapeshellarg($backup_dir.'/'.$backup['filename'])." | mysql -h ".escapeshellarg($clientdb_host)." -u ".escapeshellarg($clientdb_user)." -p".escapeshellarg($clientdb_password)." ".escapeshellarg($db_name);
133133
exec($command);
134134
}
135135
unset($clientdb_host);

0 commit comments

Comments
 (0)