mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
backup add transfer option
This commit is contained in:
@@ -12,7 +12,7 @@ class BackupDatabase extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'backup:database';
|
||||
protected $signature = 'backup:database {--transfer=}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -39,7 +39,9 @@ class BackupDatabase extends Command
|
||||
public function handle()
|
||||
{
|
||||
$rep = new ToolRepository();
|
||||
$result = $rep->backupDatabase();
|
||||
$transfer = $this->option('transfer');
|
||||
$this->info("transfer: $transfer");
|
||||
$result = $rep->backupDatabase($transfer);
|
||||
$log = sprintf('[%s], %s, result: %s', nexus()->getRequestId(), __METHOD__, var_export($result, true));
|
||||
$this->info($log);
|
||||
do_log($log);
|
||||
|
||||
@@ -12,7 +12,7 @@ class BackupWeb extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'backup:web {--method=}';
|
||||
protected $signature = 'backup:web {--method=} {--transfer=}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -39,9 +39,10 @@ class BackupWeb extends Command
|
||||
public function handle()
|
||||
{
|
||||
$method = $this->option('method');
|
||||
$this->info("method: $method");
|
||||
$transfer = $this->option('transfer');
|
||||
$this->info("method: $method, transfer: $transfer");
|
||||
$rep = new ToolRepository();
|
||||
$result = $rep->backupWeb($method);
|
||||
$result = $rep->backupWeb($method, $transfer);
|
||||
$log = sprintf('[%s], %s, result: %s', nexus()->getRequestId(), __METHOD__, var_export($result, true));
|
||||
$this->info($log);
|
||||
do_log($log);
|
||||
|
||||
@@ -88,9 +88,8 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$rep = new PluginRepository();
|
||||
// $rep->installCronjob();
|
||||
$r = $rep->getInstalledVersion('xiaomlove/nexusphp-post-like');
|
||||
$rep = new ToolRepository();
|
||||
$r = $rep->transfer('C:\Users\CHENYU~1\AppData\Local\Temp/nexusphp.v1.5.beta5.20120707.web.20220918.053953.zip', 0);
|
||||
dd($r);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user