Skip to content

Commit

Permalink
备份命令更新
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Aug 28, 2017
1 parent 75867ff commit 18e0307
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Binary file modified dist/lge.phar
Binary file not shown.
6 changes: 1 addition & 5 deletions src/_inc/module/Command/Backup.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ public function run()
$ssh->getFile($filePath, $centerBackupFilePath);
var_dump(file_exists($centerBackupFilePath));
var_dump(Lib_FileSys::getFileSize($centerBackupFilePath));
if (!file_exists($centerBackupFilePath) || filesize($centerBackupFilePath) < 1024) {
// 文件下载失败,那么远程执行命令主动同步到备份中心服务器上
$shellCmd = "scp -P {$centerConfig['port']} {$filePath} {$centerConfig['user']}@{$centerConfig['host']}:{$centerBackupFilePath}";
$ssh->syncShell($shellCmd);
}
sleep(10000);
// 备份完成后清除远程的备份文件
// $ssh->syncShell("rm {$filePath}");
}
Expand Down

0 comments on commit 18e0307

Please sign in to comment.