Skip to content

Instantly share code, notes, and snippets.

View uhlhosting's full-sized avatar
🏠
Working from home

Viorel-Cosmin Miron uhlhosting

🏠
Working from home
View GitHub Profile
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
#!/bin/bash
# Purpose: Backup mysql
# Author: Vivek Gite; under GNU GPL v2.0+
NOW=$(date +"%d-%m-%Y")
DEST="/.backup/mysql"
# set mysql login info
MUSER="root" # Username
MPASS='PASSWORD-HERE' # Password
MHOST="127.0.0.1" # Server Name
Could not restore account “highacid”: Failed to execute sql method do: (XID cu3jmn) DBD::mysql::db do failed: Can't create table `whmxfer`.`queue_paneluhlhostinbacku20160306123158jt3` (errno: 165 "Table is read only") at /usr/local/cpanel/Cpanel/DBBackend.pm line 157.
Cpanel::DBBackend::_retried_sql(Whostmgr::Transfers::Session=HASH(0x54d78e0), "do", "\x{a}--\x{a}-- Table structure for table `queue_paneluhlhostinbacku20"...) called at /usr/local/cpanel/Cpanel/DBBackend.pm line 95
Cpanel::DBBackend::_retried_do(Whostmgr::Transfers::Session=HASH(0x54d78e0), "\x{a}--\x{a}-- Table structure for table `queue_paneluhlhostinbacku20"...) called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1449
Whostmgr::Transfers::Session::_create_new_session(Whostmgr::Transfers::Session=HASH(0x54d78e0), "paneluhlhostinbacku20160306123158jt3") called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1119
Whostmgr::Transfers::Session::_set_session_id(Whostmgr::Transfers::Session=HASH(0x54d78e0), "paneluhlhostinbac
Could not restore account “highacid”: Failed to execute sql method do: (XID rwa3av) DBD::mysql::db do failed: Can't create table `whmxfer`.`queue_paneluhlhostinbacku20160306121853BsO` (errno: 165 "Table is read only") at /usr/local/cpanel/Cpanel/DBBackend.pm line 157.
Cpanel::DBBackend::_retried_sql(Whostmgr::Transfers::Session=HASH(0x54d59b0), "do", "\x{a}--\x{a}-- Table structure for table `queue_paneluhlhostinbacku20"...) called at /usr/local/cpanel/Cpanel/DBBackend.pm line 95
Cpanel::DBBackend::_retried_do(Whostmgr::Transfers::Session=HASH(0x54d59b0), "\x{a}--\x{a}-- Table structure for table `queue_paneluhlhostinbacku20"...) called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1449
Whostmgr::Transfers::Session::_create_new_session(Whostmgr::Transfers::Session=HASH(0x54d59b0), "paneluhlhostinbacku20160306121853BsO") called at /usr/local/cpanel/Whostmgr/Transfers/Session.pm line 1119
Whostmgr::Transfers::Session::_set_session_id(Whostmgr::Transfers::Session=HASH(0x54d59b0), "paneluhlhostinbac
Please disregard Terrance's reply above. He replied to the wrong ticket by mistake.
I am sorry to hear about the problems that you are having. I do see that Jesse was able to help and get MySQL back online for you. Your ticket was brought to my attention by one of our Level 1's on shift who has been monitoring the ticket at Jesse's request.
Please note as both Jesse and Kaden stated repairing corruption is not something cPanel can do because we are not experts in database corruption repair and would not want to cause any more damage to your data.
I see that you are still seeking some guidance on where to go from here in getting your sites back online and databases working. Since Jesse got MySQL/MariaDB reinstalled via our RPMs the database system itself is operational so this is good.
The problem is that the current databases are likely still corrupted beyond repair and if the guide to repairing InnoDB issues by forcing InnoDB recovery did not work, there is not much else that can be done. Have you tr
@uhlhosting
uhlhosting / IBD files
Created March 6, 2016 09:12
Notice these are 2 different backup locations - One is /innodb.bak and second /root/uhlhosting/back
root@panel [~]# find ./ -name *.ibd
./uhlhosting/mysql/back/mysql/mysql/gtid_slave_pos.ibd
./uhlhosting/mysql/back/mysql/mysql/innodb_index_stats.ibd
./uhlhosting/mysql/back/mysql/mysql/slave_worker_info.ibd
./uhlhosting/mysql/back/mysql/mysql/slave_master_info.ibd
./uhlhosting/mysql/back/mysql/mysql/innodb_table_stats.ibd
./uhlhosting/mysql/back/mysql/mysql/slave_relay_log_info.ibd
./uhlhosting/mysql/back/mysql/roundcube/contactgroups.ibd
./uhlhosting/mysql/back/mysql/roundcube/dictionary.ibd
./uhlhosting/mysql/back/mysql/roundcube/identities.ibd
mysqld]
default-storage-engine=MyISAM
default-tmp-storage-engine=MyISAM
innodb=OFF
innodb_fast_shutdown=0
innodb_force_recovery = 1
myisam-recover-options = FORCE,BACKUP
@uhlhosting
uhlhosting / server.err
Created March 6, 2016 08:37
mysql error
This file has been truncated, but you can view the full file.
160114 18:00:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160114 18:00:03 [Note] /usr/sbin/mysqld (mysqld 10.0.23-MariaDB) starting as process 23065 ...
160114 18:00:03 [Note] InnoDB: Using mutexes to ref count buffer pool pages
160114 18:00:03 [Note] InnoDB: The InnoDB memory heap is disabled
160114 18:00:03 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
160114 18:00:03 [Note] InnoDB: Memory barrier is not used
160114 18:00:03 [Note] InnoDB: Compressed tables use zlib 1.2.7
160114 18:00:03 [Note] InnoDB: Using Linux native AIO
160114 18:00:03 [Note] InnoDB: Not using CPU crc32 instructions
160114 18:00:03 [Note] InnoDB: Initializing buffer pool, size = 128.0M
root@panel [~]# pt-query-digest /var/log/mariadb/slow_query.log
/var/log/mariadb/slow_query.log: 17% 02:19 remain
/var/log/mariadb/slow_query.log: 36% 01:42 remain
/var/log/mariadb/slow_query.log: 55% 01:12 remain
/var/log/mariadb/slow_query.log: 74% 00:40 remain
/var/log/mariadb/slow_query.log: 92% 00:11 remain
# 162.4s user time, 1s system time, 93.74M rss, 291.91M vsz
# Current date: Fri Mar 4 12:17:24 2016
# Hostname: panel.uhlhosting.ch