mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
Merge branch 'php8' of github.com:xiaomlove/nexusphp into php8
This commit is contained in:
@@ -39,7 +39,7 @@ class ToolRepository extends BaseRepository
|
|||||||
$command .= " --exclude=$dirName/$item";
|
$command .= " --exclude=$dirName/$item";
|
||||||
}
|
}
|
||||||
$command .= sprintf(
|
$command .= sprintf(
|
||||||
' -czf %s -C %s %s',
|
' -czf %s -C %s %s 2>&1',
|
||||||
$filename, dirname($webRoot), $dirName
|
$filename, dirname($webRoot), $dirName
|
||||||
);
|
);
|
||||||
$result = exec($command, $output, $result_code);
|
$result = exec($command, $output, $result_code);
|
||||||
@@ -90,7 +90,7 @@ class ToolRepository extends BaseRepository
|
|||||||
$config = config("database.connections.$connectionName");
|
$config = config("database.connections.$connectionName");
|
||||||
$filename = sprintf('%s/%s.database.%s.sql', sys_get_temp_dir(), basename(base_path()), date('Ymd.His'));
|
$filename = sprintf('%s/%s.database.%s.sql', sys_get_temp_dir(), basename(base_path()), date('Ymd.His'));
|
||||||
$command = sprintf(
|
$command = sprintf(
|
||||||
'mysqldump --user=%s --password=%s --host=%s --port=%s --single-transaction --no-create-db %s >> %s',
|
'mysqldump --user=%s --password=%s --host=%s --port=%s --single-transaction --no-create-db %s >> %s 2>&1',
|
||||||
$config['username'], $config['password'], $config['host'], $config['port'], $config['database'], $filename,
|
$config['username'], $config['password'], $config['host'], $config['port'], $config['database'], $filename,
|
||||||
);
|
);
|
||||||
$result = exec($command, $output, $result_code);
|
$result = exec($command, $output, $result_code);
|
||||||
@@ -118,7 +118,7 @@ class ToolRepository extends BaseRepository
|
|||||||
if (command_exists('tar') && ($method === 'tar' || $method === null)) {
|
if (command_exists('tar') && ($method === 'tar' || $method === null)) {
|
||||||
$filename = $baseFilename . ".tar.gz";
|
$filename = $baseFilename . ".tar.gz";
|
||||||
$command = sprintf(
|
$command = sprintf(
|
||||||
'tar -czf %s -C %s %s -C %s %s',
|
'tar -czf %s -C %s %s -C %s %s 2>&1',
|
||||||
$filename,
|
$filename,
|
||||||
dirname($backupWeb['filename']), basename($backupWeb['filename']),
|
dirname($backupWeb['filename']), basename($backupWeb['filename']),
|
||||||
dirname($backupDatabase['filename']), basename($backupDatabase['filename'])
|
dirname($backupDatabase['filename']), basename($backupDatabase['filename'])
|
||||||
|
|||||||
Reference in New Issue
Block a user