My YunoHost server
Hardware: VPS running in the cloud, 512MB RAM
YunoHost version: 3.6.5.3
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : Yes
If yes, please explain:
Description of my issue
The Datacenter that hosts Yuno underwent some maintenance last night and this morning, it was discovered that Nextcloud wasn’t starting. Checking on the server, the problem is corruption in mysql database. Starting innodb recovery, I get some more output:
root@website:/home/admin# journalctl -xe
-- The job identifier is 17612.
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Warning] option 'table_open_cache': unsigned value 4 adjusted to 10
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] /usr/sbin/mysqld (mysqld 10.1.41-MariaDB-0+deb9u1) starting as process 31176 ...
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer p
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Using mutexes to ref count buffer pool pages
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: The InnoDB memory heap is disabled
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Compressed tables use zlib 1.2.8
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Using Linux native AIO
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Using SSE crc32 instructions
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Initializing buffer pool, size = 128.0M
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Completed initialization of buffer pool
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Highest supported file format is Barracuda.
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace ./ibdata1 page [page id: space=0, page number=767]. You may have t
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 09:22:41 7f99951b9800 InnoDB: Page dump in ascii and hex (16384 bytes):
Feb 19 09:22:41 website.ca mysqld[31176]: len 16384; hex fc577485000002ff000000000000000000000000b7be5ea5000200000000000000000000000000022a0c2a31ffffffff0000ffffffff00000002295200000000000001ef177200000001000002ff002c000002ff002c
Feb 19 09:22:41 website.ca mysqld[31176]: 98 : q;
Feb 19 09:22:41 website.ca mysqld[31176]: InnoDB: End of page dump
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 09:22:41 7f99951b9800 InnoDB: uncompressed page, stored checksum in field1 4233589893, calculated checksums for field1: crc32 217247264, innodb 1593023686, none 3735928559, stor
Feb 19 09:22:41 website.ca mysqld[31176]: InnoDB: page type 2 meaning UNDO LOG
Feb 19 09:22:41 website.ca mysqld[31176]: InnoDB: Page may be an update undo log page
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: It is also possible that your operating system has corrupted its own file cache and rebooting your computer removes the error. If the cor
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace ./ibdata1 page [page id: space=0, page number=267]. You may have t
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 09:22:41 7f99951b9800 InnoDB: Page dump in ascii and hex (16384 bytes):
Feb 19 09:22:41 website.ca mysqld[31176]: len 16384; hex b346fea50000010b000000000000000000000000b7bd3da60006000000000000000000000000fffffffe0000000000000000ffffffff0000ffffffff000000000000000000f311720000018b0000016affffffffffff
Feb 19 09:22:41 website.ca mysqld[31176]: R > (y;
Feb 19 09:22:41 website.ca mysqld[31176]: InnoDB: End of page dump
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 09:22:41 7f99951b9800 InnoDB: uncompressed page, stored checksum in field1 3007774373, calculated checksums for field1: crc32 956443286, innodb 3007774373, none 3735928559, stor
Feb 19 09:22:41 website.ca mysqld[31176]: InnoDB: page type 6 meaning SYS
Feb 19 09:22:41 website.ca mysqld[31176]: InnoDB: Page may be a system page
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: It is also possible that your operating system has corrupted its own file cache and rebooting your computer removes the error. If the cor
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: 128 rollback segment(s) are active.
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.44-86.0 started; log sequence number 3082708706
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] InnoDB: !!! innodb_force_recovery is set to 3 !!!
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] Plugin 'FEEDBACK' is disabled.
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297019324160 [Note] InnoDB: Dumping buffer pool(s) not yet started
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] Server socket created on IP: '::'.
Feb 19 09:22:41 website.ca mysqld[31176]: 2020-02-19 9:22:41 140297608337408 [Note] /usr/sbin/mysqld: ready for connections.
Feb 19 09:22:41 website.ca mysqld[31176]: Version: '10.1.41-MariaDB-0+deb9u1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Debian 9.9
Feb 19 09:22:41 website.ca /etc/mysql/debian-start[31203]: Upgrading MySQL tables if necessary.
Feb 19 09:22:41 website.ca /etc/mysql/debian-start[31208]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Feb 19 09:22:41 website.ca /etc/mysql/debian-start[31208]: Looking for 'mysql' as: /usr/bin/mysql
Feb 19 09:22:41 website.ca /etc/mysql/debian-start[31208]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Feb 19 09:22:41 website.ca /etc/mysql/debian-start[31208]: This installation of MySQL is already upgraded to 10.1.41-MariaDB, use --force if you still need to run mysql_upgrade
Feb 19 09:22:41 website.ca /etc/mysql/debian-start[31216]: Checking for insecure root accounts.
Feb 19 09:22:41 website.ca systemd[1]: Started MariaDB 10.1.41 database server.
-- Subject: A start job for unit mariadb.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit mariadb.service has finished successfully.
--
-- The job identifier is 17612.
Feb 19 09:22:41 website.ca /etc/mysql/debian-start[31221]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables
Feb 19 09:22:43 website.ca mysqld[31176]: InnoDB: innodb_force_recovery is on: we do not allow
Feb 19 09:22:43 website.ca mysqld[31176]: InnoDB: database modifications by the user. Shut down
Feb 19 09:22:43 website.ca mysqld[31176]: InnoDB: mysqld and edit my.cnf so thatInnoDB: innodb_force_... is removed.
Feb 19 09:22:48 website.ca mysqld[31176]: InnoDB: innodb_force_recovery is on: we do not allow
Feb 19 09:22:48 website.ca mysqld[31176]: InnoDB: database modifications by the user. Shut down
Feb 19 09:22:48 website.ca mysqld[31176]: InnoDB: mysqld and edit my.cnf so thatInnoDB: innodb_force_... is removed.
Feb 19 09:22:53 website.ca mysqld[31176]: InnoDB: innodb_force_recovery is on: we do not allow
Feb 19 09:22:53 website.ca mysqld[31176]: InnoDB: database modifications by the user. Shut down
Feb 19 09:22:53 website.ca mysqld[31176]: InnoDB: mysqld and edit my.cnf so thatInnoDB: innodb_force_... is removed.
Feb 19 09:22:56 website.ca mysqld[31176]: InnoDB: innodb_force_recovery is on: we do not allow
Feb 19 09:22:56 website.ca mysqld[31176]: InnoDB: database modifications by the user. Shut down
Feb 19 09:22:56 website.ca mysqld[31176]: InnoDB: mysqld and edit my.cnf so thatInnoDB: innodb_force_... is removed.
Unfortunately, it doesn’t look like i actually know the database name and the login info. I have recorded the root password, admin password, and all the users, but I don’t know the mysql info. sigh PEBKEC…
I also have borg backups that I take daily. Unfortunately, it appears am woefully under prepared here as well, as I’m struggling to see if the borg backup was taking a database backup and if I have any options to restore that.
My borg repo list shows a few days of backups:
auto_conf_17_02_20_00:00 Mon, 2020-02-17 00:00:28 [35bc98ec7f247e35c709afec759ced6b305b8773986668ca2d19c5232b176a0f]
auto_data_17_02_20_00:00 Mon, 2020-02-17 00:00:45 [54d478c2d1901bc9f5485f4fae3c62f261c41f98f30e14738c28337eaa167506]
auto_borg_17_02_20_00:00 Mon, 2020-02-17 00:00:59 [ac3f5ae62dd3451391f55af6fbaff08d0f81214271ed7a027bf5839fe5867318]
auto_rainloop_17_02_20_00:03 Mon, 2020-02-17 00:03:16 [61a3e8f6a4daa9400df3123e5aef91922e9da585d3fbcad5230e143a1345c54e]
auto_nextcloud_data_17_02_20_00:03 Mon, 2020-02-17 00:04:02 [86fe29de49a2695b426cddac59e0e4a142ca2ad1fe7fd84de75d186228574bbb]
auto_conf_18_02_20_00:00 Tue, 2020-02-18 00:00:22 [461d479b8e461e95c17a3e26686f9804d648d3ce7628e9782e63fa41a09a7e17]
auto_data_18_02_20_00:00 Tue, 2020-02-18 00:00:39 [e8e8987b762cab02436dfd4e20ef42288680b3eab6cf23c7f1589fd4b397c7d0]
auto_borg_18_02_20_00:00 Tue, 2020-02-18 00:00:52 [63305f59d1f1da06e49fd4d845b93108cdd55f617aaad27101b8cbbc31c8ac17]
auto_rainloop_18_02_20_00:02 Tue, 2020-02-18 00:02:14 [5831e566bd64f41293c6ac3383a66461babb3560b151701e3e715d317e0ff328]
auto_nextcloud_data_18_02_20_00:02 Tue, 2020-02-18 00:02:53 [d9bc54c2533d17643364e8aee3d0ffe7086560b1f4b35b1cf8886e1878868ff8]
auto_nextcloud_19_02_20_00:01 Wed, 2020-02-19 00:01:31 [fee604e2763091669f2cf209d53e848adfef749a260251a90fc1705b3c45ca6c]
auto_rainloop_19_02_20_00:02 Wed, 2020-02-19 00:02:21 [db28ccd95614d4c7bd8f8b48f2cfdee8c59fe3e8b5fbfe0d65ef3c74824216ef]
auto_nextcloud_data_19_02_20_00:02 Wed, 2020-02-19 00:03:03 [5f75b5609d21c3bf414d171ba146b1e9a18f03f5ef4d94465255bb42a7cd5d98]
auto_conf_19_02_20_02:03 Wed, 2020-02-19 02:04:00 [1b3c858c2e38ca686dbd9fe5ba6ac7f96fa3655eb331a96e0633e2f01436cf13]
auto_data_19_02_20_02:04 Wed, 2020-02-19 02:04:58 [60d8671872e55b82c8014da5393f726ecacb811a137ce1709a115cb811a72852]
auto_borg_19_02_20_02:05 Wed, 2020-02-19 02:05:16 [fb04530ba8928f6baa402b359966828ec6b9e912d636c084be88712fa80ef411]
auto_conf_19_02_20_08:50 Wed, 2020-02-19 08:50:42 [cfcc66f59a17e7c9fe9947fafd02b956382e5e0db0a6704ffbe82d797b29a489]
auto_data_19_02_20_08:50 Wed, 2020-02-19 08:50:55 [eb83434a5866fe51099be4ba95c71e2fcc53b138e05bfe79558e87d9660b6934]
auto_borg_19_02_20_08:51 Wed, 2020-02-19 08:51:07 [9a5e7998264c6943cff6b457c991b15f3e1546e34df9e895b25d95227563bf5a]
Now I’m unsure of how to proceed to restore Nextcloud database and get it operational again. Can good Samaritan suggest how to move forward? I’m really feeling the stress of one who thought they had backups and then realizing it wasn’t properly thought out ahead of time. I would be really greatful to any suggestions.
Thanks!