Page MenuHomePhabricator

s51412__data reverted to last year state
Closed, ResolvedPublic

Description

During maintenance on T150553, s51412__data was deleted. As I mentioned here: T127164 some databases are too large and create too much activity to provide any kind of redundancy, mistakes like this could happen, and I urged you to create backups and provided help to do that.

You mentioned you could recover those (T127164#2036868)- to help you with that, I have already recovered partially from an old copy from Sept 2015.

Apologies in advance for the disruptions, but we do have some constrained resources right now for tools databases (if you see the first task I mention, we run temporarily out of space for user databases), until we setup the new labsdb servers T140788.

Event Timeline

jcrespo created this task.Nov 15 2016, 12:18 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 15 2016, 12:18 PM
APPER added a comment.Dec 16 2016, 8:21 AM

Hi. I'm not able to recover, because there are some errors in the database. The database exists, the tables exist, too. But if I want to query a table, I always get the following error:

ERROR 1017 (HY000): Can't find file: './s51412__data/log.frm' (errno: 13)
(for table "log")

mysqlcheck failed, too (Error : Can't find file: './s51412__data/log.frm' (errno: 13))

Maybe there are some permissions missing? Could you please have a look into this?

jcrespo claimed this task.Dec 16 2016, 10:07 AM

Maybe there are some permissions missing? Could you please have a look into this?

The permissions were missing, but the main issue was that innodb tables had to be reimported. You should be able to read and write now from MyISAM tables, but I have to import the tablespace on a separate server (5.5 does not allow that process) and then reimport it to the original server. That will take some time. Please do not touch the following tables during that process:

book.ibd
dewiki_book.ibd
dewiki_external_beacon.ibd
dewiki_image.ibd
dewiki_normdaten.ibd
dewiki_pd_aemter.ibd
dewiki_spiegel.ibd
dewiki_templatedata.ibd
dewiki_templatedata_pages.ibd
dewiki_wartung_bkl_in_pd.ibd
log.ibd
misc_data.ibd

The following tables could be recovered (in addition to the existing MyISAM tables):

+---------------------------+
| Tables_in_s51412__data    |
+---------------------------+
| book                      |
| dewiki_book               |
| dewiki_external_beacon    |
| dewiki_image              |
| dewiki_normdaten          |
| dewiki_pd_aemter          |
| dewiki_spiegel            |
| dewiki_templatedata_pages |
| dewiki_wartung_bkl_in_pd  |
| log                       |
| misc_data                 |
+---------------------------+
12 rows in set (0.00 sec)

MariaDB [s51412__data]> SELECT count(*) FROM dewiki_image;
+----------+
| count(*) |
+----------+
|   628651 |
+----------+
1 row in set (0.31 sec)

The following could NOT be recovered:

dewiki_templatedata

however, its structure is available and can be written:

MariaDB [s51412__data]> SHOW CREATE TABLE dewiki_templatedata\G
*************************** 1. row ***************************
       Table: dewiki_templatedata
Create Table: CREATE TABLE `dewiki_templatedata` (
  `page_id` bigint(20) NOT NULL,
  `template_title` varchar(255) CHARACTER SET utf8 NOT NULL,
  `template_occ` int(11) NOT NULL,
  `param_name` varchar(255) CHARACTER SET utf8 NOT NULL,
  `param_value` varchar(255) CHARACTER SET utf8 NOT NULL,
  KEY `page_id` (`page_id`),
  KEY `template_title` (`template_title`),
  KEY `template_occ` (`template_occ`),
  KEY `param_name` (`param_name`),
  KEY `param_value` (`param_value`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

MariaDB [s51412__data]> SELECT * FROM dewiki_templatedata;
Empty set (0.00 sec)

MariaDB [s51412__data]> INSERT INTO dewiki_templatedata VALUES (1, '', 1, '', '');
Query OK, 1 row affected (0.00 sec)

MariaDB [s51412__data]> SELECT count(*) FROM dewiki_templatedata;
+----------+
| count(*) |
+----------+
|        1 |
+----------+
1 row in set (0.00 sec)

MariaDB [s51412__data]> TRUNCATE TABLE dewiki_templatedata;
Query OK, 0 rows affected (0.35 sec)

@APPER Everything ok now?

APPER closed this task as Resolved.Jan 2 2017, 11:07 AM

@jcrespo: Thanks. Looks like everything is back to normal.

Conny added a subscriber: Conny.Jun 17 2017, 12:29 PM