Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader
Reply
  #1  
Old 5th September 2008, 14:06
Grom's Avatar
Grom Grom is offline
Senior Member
 
Join Date: Aug 2008
Posts: 73
Smile Upgrading from v1.05+ to v2.x
Ok here is the guide for upgrading from v1.05+ to v2
READ FIRST!!!
When upgrading using this guide, you will lose everything apart from your users and torrents. Some features are also not available. Ensure you understand this fully!

Remember to backup your tracker and database BEFORE you do anything!

YOU MUST BE PHP AND MYSQL KNOWLEDGEABLE

The basic upgrade procedure will be this:
1) BACKUP! BACKUP! BACKUP!
2) Delete your current tracker files, apart from your uploads folder
3) Update the database to v2 specs
4) Upload v2 files to your server
5) adjust mysql.php and config.php
STEP 1: (BACKUP!)
============
Download your entire tracker files (and torrents if possible), backup your database (you can export via phpmyadmin).
Remember to verify your backups are good before you do anything!

We cannot be held responsible for any losses caused.
STEP 2: DELETE CURRENT SITE
============
Now you need to delete everything in your tracker apart from /uploads/ (or whatever folder you use for torrents)
STEP 3: UPDATE DATABASE
============
TorrentTrader v2 uses alot of v1.x's table structure, this makes upgrading easy(ish). Technically we should not loose anything (apart from the peers, but they will come back auto)

This query assumes you have the default user classes!

Run the following query in phpmyadmin
PHP Code:
DROP TABLE `announce`;
DROP TABLE `avps`;
DROP TABLE `files`;
DROP TABLE `news`;
DROP TABLE `news_options`;
DROP TABLE `peers`;
DROP TABLE `shoutbox_emoticons`;


CREATE TABLE `announce` (
`
idint(10unsigned NOT NULL auto_increment,
`
announce_urlvarchar(255NOT NULL default '',
`
statusvarchar(255NOT NULL default '',
`
forcevarchar(255NOT NULL default 'NO',
PRIMARY KEY (`id`),
UNIQUE KEY `announce_url` (`announce_url`),
FULLTEXT KEY `announce_url_2` (`announce_url`)
TYPE=MyISAM AUTO_INCREMENT=;

CREATE TABLE `blocks` (
`
idint(11NOT NULL auto_increment,
`
namedvarchar(255NOT NULL default '',
`
namevarchar(255NOT NULL default '',
`
positionvarchar(10NOT NULL default '',
`
descriptionvarchar(255NOT NULL default '',
`
enabledtinyint(3NOT NULL default '0',
`
sortint(11NOT NULL default '0',
PRIMARY KEY (`id`)
TYPE=MyISAM AUTO_INCREMENT=;

INSERT INTO `blocksVALUES(1'donate''donate''left''Description here...'16);
INSERT INTO `blocksVALUES(2'invite''invite''right''Description here...'12);
INSERT INTO `blocksVALUES(3'Main Navigation''navigate''left''Description here...'13);
INSERT INTO `blocksVALUES(4'Login Block''login''left''Description here...'11);
INSERT INTO `blocksVALUES(5'rss''rss''right''Description here...'15);
INSERT INTO `blocksVALUES(6'latestuploads''latestuploads''right''Description here...'11);
INSERT INTO `blocksVALUES(7'advancestats''advancestats''left''Description here...'14);
INSERT INTO `blocksVALUES(8'serverload''serverload''right''Description here...'13);
INSERT INTO `blocksVALUES(9'Users Online''usersonline''right''Users online block'18);
INSERT INTO `blocksVALUES(10'Main Category''maincats''left''Description here...'12);
INSERT INTO `blocksVALUES(11'simplesearch''simplesearch''right''Description here...'14);
INSERT INTO `blocksVALUES(12'advancesearch''advancesearch''right''Description here...'16);
INSERT INTO `blocksVALUES(13'latestimages''latestimages''right''Description here...'17);
INSERT INTO `blocksVALUES(14'mostactivetorrents''mostactivetorrents''left''Description here...'19);
INSERT INTO `blocksVALUES(15'scrollingnews''scrollingnews''left''Description here...'18);
INSERT INTO `blocksVALUES(16'newestmember''newestmember''left''Description here...'17);
INSERT INTO `blocksVALUES(17'polls''polls''left''Description here...'15);
INSERT INTO `blocksVALUES(18'seedwanted''seedwanted''left''Description here...'110);

ALTER TABLE `categoriesADD `subcatchar(3NOT NULL default 'no';
ALTER TABLE `categoriesADD `parent_catvarchar(15NOT NULL default '';
ALTER TABLE `categoriesADD `sub_sortchar(3NOT NULL default '';

CREATE TABLE `completed` (
`
idint(10unsigned NOT NULL auto_increment,
`
useridint(10NOT NULL default '0',
`
torrentidint(10NOT NULL default '0',
`
datedatetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
TYPE=MyISAM AUTO_INCREMENT=;

CREATE TABLE `email_bans` (
`
idint(10unsigned NOT NULL auto_increment,
`
useridint(11) default '0',
`
addeddatetime NOT NULL default '0000-00-00 00:00:00',
`
addedbyint(10unsigned NOT NULL default '0',
`
commentvarchar(255NOT NULL default '',
`
mail_domainvarchar(255) default NULL,
PRIMARY KEY (`id`)
TYPE=MyISAM AUTO_INCREMENT=;

CREATE TABLE `groups` (
`
group_idint(10NOT NULL auto_increment,
`
levelvarchar(50NOT NULL default '',
`
view_torrentsenum('yes','no'NOT NULL default 'yes',
`
edit_torrentsenum('yes','no'NOT NULL default 'no',
`
delete_torrentsenum('yes','no'NOT NULL default 'no',
`
view_usersenum('yes','no'NOT NULL default 'yes',
`
edit_usersenum('yes','no'NOT NULL default 'no',
`
delete_usersenum('yes','no'NOT NULL default 'no',
`
view_newsenum('yes','no'NOT NULL default 'yes',
`
edit_newsenum('yes','no'NOT NULL default 'no',
`
delete_newsenum('yes','no'NOT NULL default 'no',
`
can_uploadenum('yes','no'NOT NULL default 'no',
`
can_downloadenum('yes','no'NOT NULL default 'yes',
`
view_forumenum('yes','no'NOT NULL default 'yes',
`
edit_forumenum('yes','no'NOT NULL default 'yes',
`
delete_forumenum('yes','no'NOT NULL default 'no',
`
control_panelenum('yes','no'NOT NULL default 'no',
UNIQUE KEY `base` (`group_id`)
TYPE=MyISAM AUTO_INCREMENT=10 ;

INSERT INTO `groups` (`group_id`, `level`, `view_torrents`, `edit_torrents`, `delete_torrents`, `view_users`, `edit_users`, `delete_users`, `view_news`, `edit_news`, `delete_news`, `can_upload`, `can_download`, `view_forum`, `edit_forum`, `delete_forum`, `control_panel`) VALUES
(1'Member''yes''no''no''yes''no''no''yes''no''no''yes''yes''yes''no''no''no'),
(
2'Power User''yes''no''no''yes''no''no''yes''no''no''no''yes''yes''no''no''no'),
(
3'VIP''yes''no''no''yes''no''no''yes''no''no''yes''no''yes''no''no''no'),
(
4'Uploader''yes''no''no''yes''no''no''yes''no''no''yes''yes''yes''no''no''no'),
(
5'Moderator''yes''yes''no''yes''yes''no''yes''yes''no''yes''yes''yes''yes''no''no'),
(
6'Super Moderator''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''no'),
(
7'Administrator''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes''yes');

ALTER TABLE `messagesADD `subjecttext NOT NULL;
ALTER TABLE `messagesADD `locationenum('in','out','both','draft','template'NOT NULL default 'in';

CREATE TABLE `news` (
`
idint(10unsigned NOT NULL auto_increment,
`
useridint(11NOT NULL default '0',
`
addeddatetime NOT NULL default '0000-00-00 00:00:00',
`
titlevarchar(255NOT NULL default '',
`
bodytext NOT NULL,
PRIMARY KEY (`id`),
KEY `added` (`added`)
TYPE=MyISAM AUTO_INCREMENT=;

CREATE TABLE `peers` (
`
idint(10unsigned NOT NULL auto_increment,
`
torrentint(10unsigned NOT NULL default '0',
`
peer_idvarchar(40NOT NULL default '',
`
ipvarchar(64NOT NULL default '',
`
portsmallint(5unsigned NOT NULL default '0',
`
uploadedbigint(20unsigned NOT NULL default '0',
`
downloadedbigint(20unsigned NOT NULL default '0',
`
to_gobigint(20unsigned NOT NULL default '0',
`
seederenum('yes','no'NOT NULL default 'no',
`
starteddatetime NOT NULL default '0000-00-00 00:00:00',
`
last_actiondatetime NOT NULL default '0000-00-00 00:00:00',
`
connectableenum('yes','no'NOT NULL default 'yes',
`
clientvarchar(60NOT NULL default '',
`
useridvarchar(32NOT NULL default '',
`
passkeyvarchar(32NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `torrent_peer_id` (`torrent`,`peer_id`),
KEY `torrent` (`torrent`),
KEY `torrent_seeder` (`torrent`,`seeder`),
KEY `last_action` (`last_action`)
TYPE=MyISAM AUTO_INCREMENT=;

CREATE TABLE `tasks` (
`
taskvarchar(20NOT NULL default '',
`
last_timeint(10NOT NULL default '0',
PRIMARY KEY (`task`)
TYPE=MyISAM;

INSERT INTO `tasks` (`task`, `last_time`) VALUES
('cleanup'1189083893);

CREATE TABLE `torrentlang` (
`
idint(10unsigned NOT NULL auto_increment,
`
namevarchar(30NOT NULL default '',
`
imagevarchar(255NOT NULL default '',
`
sort_indexint(10unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
TYPE=MyISAM AUTO_INCREMENT=;

INSERT INTO `torrentlang` (`id`, `name`, `image`, `sort_index`) VALUES
(1'English''english.gif'1),
(
2'French'''1),
(
3'German'''1),
(
4'Italian'''1),
(
5'Japan'''1),
(
6'Spanish'''1),
(
7'Russian'''1);

CREATE TABLE `teams` (
`
idint(10NOT NULL auto_increment,
`
addeddatetime NOT NULL default '0000-00-00 00:00:00',
`
ownerint(10NOT NULL default '0',
`
infotext,
`
namevarchar(255) default NULL,
`
imagevarchar(255) default NULL,
UNIQUE KEY `id` (`id`)
TYPE=MyISAM AUTO_INCREMENT=;

CREATE TABLE `warnings` (
`
idint(10NOT NULL auto_increment,
`
useridint(10NOT NULL default '0',
`
reasonvarchar(255NOT NULL default '',
`
addeddatetime NOT NULL default '0000-00-00 00:00:00',
`
expirydatetime NOT NULL default '0000-00-00 00:00:00',
`
warnedbyint(10NOT NULL default '0',
`
typevarchar(10NOT NULL default '',
PRIMARY KEY (`id`)
TYPE=MyISAM AUTO_INCREMENT=;

ALTER TABLE `torrentsADD `announcevarchar(255NOT NULL default '';
ALTER TABLE `torrentsADD `externalchar(3NOT NULL default 'no';
ALTER TABLE `torrentsADD `torrentlangint(10unsigned NOT NULL default '1';
ALTER TABLE `torrentsADD `freeleechenum('0','1'NOT NULL default '0';
ALTER TABLE `torrentsADD `image1text NOT NULL;
ALTER TABLE `torrentsADD `image2text NOT NULL;
ALTER TABLE `torrentsMODIFY `info_hashvarchar(40) default NULL;

ALTER TABLE `usersDROP `ircnick`;
ALTER TABLE `usersDROP `ircpass`;
ALTER TABLE `usersADD `passkeyvarchar(32NOT NULL default '';
ALTER TABLE `usersADD `pagetext NOT NULL;
ALTER TABLE `usersADD `teamint(10unsigned NOT NULL default '0';
ALTER TABLE `usersCHANGE `class` `classTINYINTUNSIGNED NOT NULL DEFAULT '1';

ALTER TABLE `usersADD `tzoffsetINT(4UNSIGNED DEFAULT 0;
ALTER TABLE `categoriesADD UNIQUE `parent_cat-name` (`parent_cat`, `name` );
ALTER TABLE `torrentsADD `anonENUM'yes''no' NOT NULL DEFAULT 'no' AFTER `owner`;

UPDATE users SET class = 7 WHERE class=5;
UPDATE users SET class = 6 WHERE class=4;
UPDATE users SET class = 5 WHERE class=3;
UPDATE users SET class = 4 WHERE class=1;
UPDATE users SET class = 3 WHERE class=2;
UPDATE users SET class = 1 WHERE class=0
STEP 4: FILE UPLOAD
============
Now you need to upload all v2's files to your tracker (simple eh)
Chmod to 777
/cache/
/backups/
/uploads/
/uploads/images/

if you have any of those folders missing (eg: /uploads/images/), please create them and chmod 777
STEP 5: UPDATE SITE SETTINGS
============
1) edit backend/mysql.php and input your database connection settings
2) edit backend/config.php, remember to check all settings and input email's, url's, announce, paths etc

If you have issues with the paths, please use check.php
FINISH
POST INSTALL:
- You will need to rename or delete check.php (otherwise you will receive a warning on the index)
- All members will need to re-download the .torrent files from the site so that the passkey is added correctly (both seeders and leechers)
- You should check staff and members are set with the correct classes/usergroups
- You will need to edit your categories so that they have parent cats assigned
Reply With Quote
The Following 4 Users Say Thank You to Grom For This Useful Post:
C-4 (11th March 2017), Fynnon (8th July 2011), goodboyz (20th February 2010), unkn0wn (5th January 2012)
Reply

Tags
upgrading , v105 , v2x

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading phpBB joeroberts BT.Manager (phpMyBitTorrent) 1 29th January 2010 00:39
upgrading from ts5.0 to ts5.3 Cleanup Template Shares 4 10th October 2008 05:41



All times are GMT +2. The time now is 15:34. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.