Skip to content
Snippets Groups Projects
Commit 5a945f3a authored by Marius Burkard's avatar Marius Burkard
Browse files

- fixed mysql command for backup restore

parent 80198b37
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,7 @@ class backup_plugin { ...@@ -129,7 +129,7 @@ class backup_plugin {
//$db_name = $parts[1]; //$db_name = $parts[1];
preg_match('@^db_(.+)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql\.gz$@', $backup['filename'], $matches); preg_match('@^db_(.+)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql\.gz$@', $backup['filename'], $matches);
$db_name = $matches[1]; $db_name = $matches[1];
$command = "gunzip --stdout ".escapeshellarg($backup_dir.'/'.$backup['filename'])." | mysql -h '".escapeshellarg($clientdb_host)."' -u '".escapeshellarg($clientdb_user)."' -p'".escapeshellarg($clientdb_password)."' '".$db_name."'"; $command = "gunzip --stdout ".escapeshellarg($backup_dir.'/'.$backup['filename'])." | mysql -h ".escapeshellarg($clientdb_host)." -u ".escapeshellarg($clientdb_user)." -p".escapeshellarg($clientdb_password)." ".escapeshellarg($db_name);
exec($command); exec($command);
} }
unset($clientdb_host); unset($clientdb_host);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment