1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
Oinktube/install/mysqlDump.php
2022-05-09 10:54:31 -03:00

15 lines
389 B
PHP

<?php
//streamer config
require_once '../videos/configuration.php';
if (!isCommandLineInterface()) {
return die('Command Line only');
}
ob_end_flush();
$file = Video::getStoragePath().'mysqldump-'.date('YmdHis').'.sql';
passthru("mysqldump --opt -u '{$mysqlUser}' -p'{$mysqlPass}' -h {$mysqlHost} {$mysqlDatabase} > {$file}");
echo PHP_EOL."Dump file created at {$file}".PHP_EOL;