diff --git a/src/Appwrite/Platform/Tasks/DbRestore.php b/src/Appwrite/Platform/Tasks/DbRestore.php index ca438690f7..78d6944552 100644 --- a/src/Appwrite/Platform/Tasks/DbRestore.php +++ b/src/Appwrite/Platform/Tasks/DbRestore.php @@ -30,9 +30,8 @@ class DbRestore extends Action */ public function action(string $file): void { - // $file = '2023-07-12_09:37:47.tar.gz'; - - Console::log('Restoring backup' . $file); + $start = microtime(true); + Console::log('Started' . $file); $file = DbBackup::$backups . '/' . $file; @@ -51,24 +50,17 @@ class DbRestore extends Action $stdout = ''; $stderr = ''; - -// $start = microtime(true); -// Console::log($start); - $cmd = 'tar -xzf ' . $file . ' -C ' . $this->extract; Console::log($cmd); $code = Console::execute($cmd, '', $stdout, $stderr); - -// Console::log('time end ' . (microtime(true) - $start)); - if (!empty($stderr)) { Console::error($stderr); Console::exit(); } Console::log($stdout); -// // Todo: start down target container + // Todo: start down target container - Console::log("Restore Finish"); + Console::log("Restore Finish in " . (microtime(true) - $start) . " seconds"); } }