Location: PHPKode > projects > H-tracker > backupDB.config.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//
require_once("backend/mysql.php");
require_once("backend/config.php"); 
// Integrated by hack346
define('ADMIN_EMAIL', $site_config['SITEEMAIL']);
define('DB_HOST', (isset($_REQUEST['DB_HOST']) ? $_REQUEST['DB_HOST'] : $mysql_host)); // usually 'localhost'
define('DB_USER', (isset($_REQUEST['DB_USER']) ? $_REQUEST['DB_USER'] : $mysql_user));  // MySQL username
define('DB_PASS', (isset($_REQUEST['DB_PASS']) ? $_REQUEST['DB_PASS'] : $mysql_pass));  // MySQL password
define('DB_NAME', (isset($_REQUEST['DB_NAME']) ? $_REQUEST['DB_NAME'] : $mysql_db));  // MySQL dbname  
// Only define DB_NAME if you want to restrict to ONLY this
// database, otherwise all accessible databases will be backed up
if (!empty($_REQUEST['onlyDB'])) {
	define('DB_NAME', $_REQUEST['onlyDB']);
} else {
	// uncomment this line if you want to define a single database to back up
	// note: this may be required for some servers, where the user cannot list available databases

	//define('DB_NAME', 'database');
}

define('BACKTICKCHAR',             '`');
define('QUOTECHAR',                '\'');
define('LINE_TERMINATOR',          "\n");    // \n = UNIX; \r\n = Windows; \r = Mac
define('BUFFER_SIZE',              32768);   // in bytes
define('TABLES_PER_COL',           30);      // number of table names per column in partial table backup selection screen
define('STATS_INTERVAL',           500);     // number of records processed between each DHTML stats refresh
define('MYSQL_RECONNECT_INTERVAL', 100000);  // disconnect and reconnect to MySQL every <interval> rows, to prevent timeouts
define('OUTPUT_COMPRESSION_TYPE',  'gzip'); // 'bzip2', 'gzip', 'none'; best at "bzip2" for mysqldump-based backups, "gzip" for PHP-based backups
define('OUTPUT_COMPRESSION_LEVEL', 6);       // bzip2/gzip compression level (1=fastest,9=best)

$DHTMLenabled       = true;  // set $DHTMLenabled = FALSE to prevent JavaScript errors in incompatible browsers
                             // set $DHTMLenabled = TRUE to get the nice DHTML display in recent browsers

$dbNameInCreate     = true;  // if true: "CREATE TABLE `database`.`table`", if false: "CREATE TABLE `table`"

$CreateIfNotExists  = false; // if true: "CREATE TABLE IF NOT EXISTS `database`.`table`", if false: "CREATE TABLE `database`.`table`"

$ReplaceInto        = false; // if true: "REPLACE INTO ", if false: "INSERT INTO "

$HexBLOBs           = true;  // if true: blobs get data dumped as hex string; if false: blobs get data dumped as escaped binary string

$SuppressHTMLoutput = (@$_REQUEST['nohtml'] ? true : false); // disable all output for running as a cron job

$Disable_mysqldump  = true;  // LEAVE THIS AS "false"! If true, avoid use of "mysqldump" program to export databases which is *MUCH* *MUCH* faster than doing it row-by-row in PHP. Highly recommended to leave this at "false" (i.e. use mysqldump)

$backuptimestamp    = '.'.date('Y-m-d'); // timestamp
if (!empty($_REQUEST['onlyDB'])) {
	$backuptimestamp = '.'.$_REQUEST['onlyDB'].$backuptimestamp;
}
//$backuptimestamp    = ''; // no timestamp
$backupabsolutepath = dirname(__FILE__).'/backups/'; // make sure to include trailing slash
$fileextension = ((OUTPUT_COMPRESSION_TYPE == 'bzip2') ? '.bz2' : ((OUTPUT_COMPRESSION_TYPE == 'gzip') ? '.gz' : ''));
$fullbackupfilename = 'db_backup'.$backuptimestamp.'.sql'.$fileextension;
$partbackupfilename = 'db_backup_partial'.$backuptimestamp.'.sql'.$fileextension;
$strubackupfilename = 'db_backup_structure'.$backuptimestamp.'.sql'.$fileextension;
$tempbackupfilename = 'db_backup.temp.sql'.$fileextension;

$NeverBackupDBtypes = array('HEAP');
$CloseWindowOnFinish = false;


?>
Return current item: H-tracker