$filename = ROOT . '/database_backup/db.sql';
$mysqlDumpPath = "/usr/bin/mysqldump";
$mysqlDumpParam = " --user=" . DB_USER . " --password=" . DB_PASSWORD;
$mysqlDumpParam .= " --no-create-db --add-drop-table --databases " . DB_NAME;
if (file_exists($filename)) rename($filename, $filename . '.prev');
exec($mysqlDumpPath . $mysqlDumpParam . " > " . $filename);
say("Подготовка к перезагрузке",2);
setTimeout("shutdownTimer","safe_exec('shutdown -r now');",15);