RECUPERAR TEMA BORRADO.
Publicado: 07 Abr 2013, 20:11
la cuestion es que a un moderador de mi foro, en un cabreo se le fue la olla y borro un tema importantisimo del foro, por cuestiones sentimentales e historico para los foristas, un tema mas de 300 paginas.
pues bien, os explico lo que he hecho para intentar recuperarlo:
he instalado en localhost una base de datos que contenia el tema en cuestion. he borrado todos los temas en localhost, hasta dejar solamente ese. despues he generado los archivos para la importacion.
ahora vienen las preguntas:
¿cuales son las tablas que hay que exportar para posteriormente despues importarla a la base de datos del foro? supongo que son estas verdad? estas han sido las que he exportado.
phpbb_topics
phpbb_topics_posted
phpbb_topics_track
phpbb_topics_watch
phpbb_posts
y otra preguta: como lo que quiero es que lo unico que haga sea insertar el tema unica y exclusivamente sin borrar nada. ¿como debo hacer la consulta para que no borre absolutamente nada del foro?
os copio aqui, el archivo generado en una de las tablas al aislar el tema en localhost, y me decis si esta bien o debo cambiar algo para que no borre nada.
[code]-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 06-04-2013 a las 09:54:08
-- Versión del servidor: 5.5.8
-- Versión de PHP: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!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 */;
--
-- Base de datos: `bd2`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `phpbb_topics`
--
CREATE TABLE IF NOT EXISTS `phpbb_topics` (
`topic_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`forum_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`icon_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_attachment` tinyint(1) unsigned NOT NULL DEFAULT '0',
`topic_approved` tinyint(1) unsigned NOT NULL DEFAULT '1',
`topic_reported` tinyint(1) unsigned NOT NULL DEFAULT '0',
`topic_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`topic_poster` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_time` int(11) unsigned NOT NULL DEFAULT '0',
`topic_time_limit` int(11) unsigned NOT NULL DEFAULT '0',
`topic_views` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_replies` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_replies_real` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_status` tinyint(3) NOT NULL DEFAULT '0',
`topic_type` tinyint(3) NOT NULL DEFAULT '0',
`topic_first_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_first_poster_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_first_poster_colour` varchar(6) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_last_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_last_poster_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_last_poster_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_last_poster_colour` varchar(6) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_last_post_subject` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_last_post_time` int(11) unsigned NOT NULL DEFAULT '0',
`topic_last_view_time` int(11) unsigned NOT NULL DEFAULT '0',
`topic_moved_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_bumped` tinyint(1) unsigned NOT NULL DEFAULT '0',
`topic_bumper` mediumint(8) unsigned NOT NULL DEFAULT '0',
`poll_title` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`poll_start` int(11) unsigned NOT NULL DEFAULT '0',
`poll_length` int(11) unsigned NOT NULL DEFAULT '0',
`poll_max_options` tinyint(4) NOT NULL DEFAULT '1',
`poll_last_vote` int(11) unsigned NOT NULL DEFAULT '0',
`poll_vote_change` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`topic_id`),
KEY `forum_id` (`forum_id`),
KEY `forum_id_type` (`forum_id`,`topic_type`),
KEY `last_post_time` (`topic_last_post_time`),
KEY `topic_approved` (`topic_approved`),
KEY `forum_appr_last` (`forum_id`,`topic_approved`,`topic_last_post_id`),
KEY `fid_time_moved` (`forum_id`,`topic_last_post_time`,`topic_moved_id`),
KEY `topic_last_post_id` (`topic_last_post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=16976 ;
--
-- Volcar la base de datos para la tabla `phpbb_topics`
--
INSERT INTO `phpbb_topics` (`topic_id`, `forum_id`, `icon_id`, `topic_attachment`, `topic_approved`, `topic_reported`, `topic_title`, `topic_poster`, `topic_time`, `topic_time_limit`, `topic_views`, `topic_replies`, `topic_replies_real`, `topic_status`, `topic_type`, `topic_first_post_id`, `topic_first_poster_name`, `topic_first_poster_colour`, `topic_last_post_id`, `topic_last_poster_id`, `topic_last_poster_name`, `topic_last_poster_colour`, `topic_last_post_subject`, `topic_last_post_time`, `topic_last_view_time`, `topic_moved_id`, `topic_bumped`, `topic_bumper`, `poll_title`, `poll_start`, `poll_length`, `poll_max_options`, `poll_last_vote`, `poll_vote_change`) VALUES
(6450, 61, 0, 0, 1, 0, 'La Terraza', 1, 1301086740, 0, 20268, 3840, 3840, 0, 1, 37492, 'A Garota', '', 235877, 103, 'Víctor Díaz', '', 'Re: La Terraza', 1362364192, 1365240330, 0, 0, 0, '', 0, 0, 1, 0, 0);
[/code]
pues bien, os explico lo que he hecho para intentar recuperarlo:
he instalado en localhost una base de datos que contenia el tema en cuestion. he borrado todos los temas en localhost, hasta dejar solamente ese. despues he generado los archivos para la importacion.
ahora vienen las preguntas:
¿cuales son las tablas que hay que exportar para posteriormente despues importarla a la base de datos del foro? supongo que son estas verdad? estas han sido las que he exportado.
phpbb_topics
phpbb_topics_posted
phpbb_topics_track
phpbb_topics_watch
phpbb_posts
y otra preguta: como lo que quiero es que lo unico que haga sea insertar el tema unica y exclusivamente sin borrar nada. ¿como debo hacer la consulta para que no borre absolutamente nada del foro?
os copio aqui, el archivo generado en una de las tablas al aislar el tema en localhost, y me decis si esta bien o debo cambiar algo para que no borre nada.
[code]-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 06-04-2013 a las 09:54:08
-- Versión del servidor: 5.5.8
-- Versión de PHP: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!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 */;
--
-- Base de datos: `bd2`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `phpbb_topics`
--
CREATE TABLE IF NOT EXISTS `phpbb_topics` (
`topic_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`forum_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`icon_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_attachment` tinyint(1) unsigned NOT NULL DEFAULT '0',
`topic_approved` tinyint(1) unsigned NOT NULL DEFAULT '1',
`topic_reported` tinyint(1) unsigned NOT NULL DEFAULT '0',
`topic_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`topic_poster` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_time` int(11) unsigned NOT NULL DEFAULT '0',
`topic_time_limit` int(11) unsigned NOT NULL DEFAULT '0',
`topic_views` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_replies` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_replies_real` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_status` tinyint(3) NOT NULL DEFAULT '0',
`topic_type` tinyint(3) NOT NULL DEFAULT '0',
`topic_first_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_first_poster_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_first_poster_colour` varchar(6) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_last_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_last_poster_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_last_poster_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_last_poster_colour` varchar(6) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_last_post_subject` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`topic_last_post_time` int(11) unsigned NOT NULL DEFAULT '0',
`topic_last_view_time` int(11) unsigned NOT NULL DEFAULT '0',
`topic_moved_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`topic_bumped` tinyint(1) unsigned NOT NULL DEFAULT '0',
`topic_bumper` mediumint(8) unsigned NOT NULL DEFAULT '0',
`poll_title` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`poll_start` int(11) unsigned NOT NULL DEFAULT '0',
`poll_length` int(11) unsigned NOT NULL DEFAULT '0',
`poll_max_options` tinyint(4) NOT NULL DEFAULT '1',
`poll_last_vote` int(11) unsigned NOT NULL DEFAULT '0',
`poll_vote_change` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`topic_id`),
KEY `forum_id` (`forum_id`),
KEY `forum_id_type` (`forum_id`,`topic_type`),
KEY `last_post_time` (`topic_last_post_time`),
KEY `topic_approved` (`topic_approved`),
KEY `forum_appr_last` (`forum_id`,`topic_approved`,`topic_last_post_id`),
KEY `fid_time_moved` (`forum_id`,`topic_last_post_time`,`topic_moved_id`),
KEY `topic_last_post_id` (`topic_last_post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=16976 ;
--
-- Volcar la base de datos para la tabla `phpbb_topics`
--
INSERT INTO `phpbb_topics` (`topic_id`, `forum_id`, `icon_id`, `topic_attachment`, `topic_approved`, `topic_reported`, `topic_title`, `topic_poster`, `topic_time`, `topic_time_limit`, `topic_views`, `topic_replies`, `topic_replies_real`, `topic_status`, `topic_type`, `topic_first_post_id`, `topic_first_poster_name`, `topic_first_poster_colour`, `topic_last_post_id`, `topic_last_poster_id`, `topic_last_poster_name`, `topic_last_poster_colour`, `topic_last_post_subject`, `topic_last_post_time`, `topic_last_view_time`, `topic_moved_id`, `topic_bumped`, `topic_bumper`, `poll_title`, `poll_start`, `poll_length`, `poll_max_options`, `poll_last_vote`, `poll_vote_change`) VALUES
(6450, 61, 0, 0, 1, 0, 'La Terraza', 1, 1301086740, 0, 20268, 3840, 3840, 0, 1, 37492, 'A Garota', '', 235877, 103, 'Víctor Díaz', '', 'Re: La Terraza', 1362364192, 1365240330, 0, 0, 0, '', 0, 0, 1, 0, 0);
[/code]