Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Backup Database
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2012-07-11 14:48:26
Try this new Backup Database

compatible with 2.07 and 2.08

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5858"]backup-database.rar[/url]
backup-database.rar
Download
Unknown User
2012-07-17 09:32:27
what diferent this code about default for 2.08?
Unknown User
2012-07-17 09:59:24
"Mythos, post: 84247":
what diferent this code about default for 2.08?

On shared hosting its a security risk for exec, shell_exec, system to be left open for users to use so this functionality becomes disabled meaning TT's backup-database.php is pretty useless to them, for anyone who has a vps, dedicated server if these functions are disabled can be easily edited via their control panels / php.ini.
Unknown User
2012-07-17 17:10:32
if i understand good the backup-database from yesszus is for vps and dedicated server not shared?

Unknown User
2012-07-17 19:08:28
not much on TT works on a shared system.. they either dont have resources, too restricted, and/or just plain dont have the stuff needed to run a torrent site from.

the 1 from yesszus looks cool and looks like it might deal with some of the utf8 issues people have.  But to me i cant use it anyway it stores as .sql and thats just plain huge on my site hehe not like I have unlimited hd space hehe.
Unknown User
2013-03-16 18:29:51
what is this for in backup.php

 $return.="-- Dumper: http://torrentor.try.hu";



can it be changed ?







<?php

//

// TorrentTrader v2.x

// Backup Database

// $CreatedDate: 2012-07-11 07:38:09 +0000 (Wed, 11 July 2012) $

// $CreatedBy: Torrentor Tracker $

// http://torrentor.try.hu

//

// http://www.torrenttrader.org

//

require_once ("backend/functions.php");

require_once ("backend/mysql.php");

dbconn();



backup_tables($mysql_host,$mysql_user,$mysql_pass,$mysql_db);



function backup_tables($host,$user,$pass,$name,$tables = '*')



{

$link = mysql_connect($host,$user,$pass);

mysql_select_db($name,$link);

$return.="-- Dumper: http://torrentor.try.hu";

$return.="n-- Torrentor Tracker";

$return.="n--";

$return.="n-- Host: $host";

$return.="n-- Database: $name";

$return.="n-- Create time: ". date("Y-m-d") ."";

$return.="n-- PHP version: ".phpversion()."";

$return.="nn";

$return.="SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";nSET time_zone = "+00:00";



/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8 */;nn";



if($tables == '*')

{

$tables = array();

$result = mysql_query('SET NAMES utf8');

$result = mysql_query('SET CHARACTER SET utf8');

$result = mysql_query('SET COLLATION_CONNECTION="utf8_general_ci"');

$result = mysql_query('SHOW TABLES');

while($row = mysql_fetch_row($result))

{

$tables[] = $row[0];

}

}

else

{

$tables = is_array($tables) ? $tables : explode(',',$tables);

}



foreach($tables as $table)

{

$result = mysql_query('SELECT * FROM '.$table);

$num_fields = mysql_num_fields($result);

$return.="--n-- Table structure for table: `$table`n--nn";

@($return.= "DROP TABLE IF EXISTS `".$table."`;n");

$row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$table));

$return.= "".$row2[1].";nn--n-- Dumping data for table: `$table`n--nn";



for ($i = 0; $i < $num_fields; $i++)

{

while($row = mysql_fetch_row($result))

{

$return.= 'INSERT INTO '.$table.' VALUES(';

for($j=0; $j<$num_fields; $j++)

{

$row[$j] = addslashes($row[$j]);

$row[$j] = preg_replace("#n#", "n", $row[$j]);

if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }

if ($j<($num_fields-1)) { $return.= ','; }

}

$replaces[') TYPE=MyISAM;'] = ') TYPE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;';

$return.= ");n";

}

}

$return.="n-- --------------------------------------------------------nn";

}

$return.="/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;nn";





$handle = fopen('backups/'.$name.'-db-backup-'. date("Y-m-d") .'.sql','w+');

if (fwrite($handle, $return) === FALSE) {

echo "<p align='center'><font size='4'><font color='red'>".T_("CANNOT_WRITE_FILE")."</font></font></p>";

exit;

}



print ("<p align='center'><font size='4'><font color='green'>".T_("DONE")."</font></font></p>");



chmod('backups/'.$name.'-db-backup-'.date("Y-m-d").'.sql', 0777);

fclose($handle);

}



die;

?>

Unknown User
2013-03-16 22:06:08
That dont do shit looks like an lame attempt to advertize there site.. You can change it or remove it.. I remove all other sites urls from my phps other then well torrenttrader.org..
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728