" . $_dir . "/" . $backupFile; try { system($command); return $backupFile; } catch (Exception $ex) { return FALSE; } } public static function dumpMysqlRestore(string $_backupFile) { $command = "mysql -h " . DB_HOST . " -u " . DB_USER . " -p" . DB_PASS . " " . DB_NAME . " < " . $_backupFile; try { system($command); return TRUE; } catch (Exception $ex) { return FALSE; } } public static function scanFolder() { $tempArray = array(); if ($scandir = scandir(DIR_BACKUP)) { foreach ($scandir as $file) { $tempFile = NULL; if (is_file(DIR_BACKUP . $file) === TRUE and $file != "index.html") { $tempFile["file"] = $file; $tempFile["size"] = core::formatFileSize(filesize(DIR_BACKUP . $file), 2); $tempFile["date"] = core::dateFromTimestamp(filemtime(DIR_BACKUP . $file)); $tempArray[] = $tempFile; } } } return $tempArray; } }