Hello,
Unfortunately my home-assistant_v2.db disappeared completely random ( overnight? ) from my /config/ folder. I really don’t know what happend, but it’s pretty important for me to restore all the ‘long-term’ history data… But I guess I will end up with all my data being lost, unless someone has a good solution for me?
The mariadb output logs:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[09:51:15] INFO: Using existing mariadb initial system
[09:51:16] INFO: Starting MariaDB
220329 09:51:18 mysqld_safe Logging to '/data/databases/mariadb.err'.
220329 09:51:18 mysqld_safe Starting mysqld daemon with databases from /data/databases
220329 09:51:18 mysqld_safe Starting mysqld daemon with databases from /data/databases
2022-03-29 9:51:20 0 [Note] /usr/bin/mysqld (mysqld 10.4.19-MariaDB) starting as process 397 ...
2022-03-29 9:51:20 0 [Note] InnoDB: Using Linux native AIO
2022-03-29 9:51:20 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-03-29 9:51:20 0 [Note] InnoDB: Uses event mutexes
2022-03-29 9:51:20 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-03-29 9:51:20 0 [Note] InnoDB: Number of pools: 1
2022-03-29 9:51:20 0 [Note] InnoDB: Using generic crc32 instructions
2022-03-29 9:51:20 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2022-03-29 9:51:21 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2022-03-29 9:51:21 0 [Note] InnoDB: Completed initialization of buffer pool
2022-03-29 9:51:21 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-03-29 9:51:21 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=269677638126
2022-03-29 9:51:21 0 [Note] InnoDB: 1 transaction(s) which must be rolled back or cleaned up in total 38 row operations to undo
2022-03-29 9:51:21 0 [Note] InnoDB: Trx id counter is 18210404
2022-03-29 9:51:21 0 [Note] InnoDB: Starting final batch to recover 30 pages from redo log.
2022-03-29 9:51:21 0 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace homeassistant/events page [page id: space=5, page number=49730]. You may have to recover from a backup.
2022-03-29 9:51:21 0 [Note] InnoDB: Page dump in ascii and hex (16384 bytes):
len 16384; hex
-- removed dump due too many characters for this post
InnoDB: End of page dump
2022-03-29 9:51:22 0 [Note] InnoDB: Uncompressed page, stored checksum in field1 3432143944, calculated checksums for field1: crc32 2618634665, innodb 1844157532, page type 17855 == INDEX.none 3735928559, stored checksum in field2 2998307939, calculated checksums for field2: crc32 2618634665, innodb 3687756281, none 3735928559, page LSN 62 3389662677, low 4 bytes of LSN at page end 3389664850, page number (if stored to page already) 49730, space id (if created with >= MySQL-4.1.1 and stored already) 5
2022-03-29 9:51:22 0 [Note] InnoDB: Page may be an index page where index id is 27
2022-03-29 9:51:22 0 [Note] InnoDB: Index 27 is `ix_events_time_fired` in table `homeassistant`.`events`
2022-03-29 9:51:22 0 [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 corrupt page is an index page. You can also try to fix the corruption by dumping, dropping, and reimporting the corrupt table. You can use CHECK TABLE to scan your table for corruption. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
2022-03-29 9:51:22 0 [ERROR] InnoDB: Failed to read file './homeassistant/events.ibd' at offset 49730: Page read from tablespace is corrupted.
2022-03-29 9:51:22 0 [Note] InnoDB: Set innodb_force_recovery=1 to ignore corrupted pages.
2022-03-29 9:51:22 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2022-03-29 9:51:23 0 [Note] InnoDB: Starting shutdown...
2022-03-29 9:51:23 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-03-29 9:51:23 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-03-29 9:51:23 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-03-29 9:51:24 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-03-29 9:51:24 0 [ERROR] Aborting
220329 09:51:24 mysqld_safe mysqld from pid file /data/databases/core-mariadb.pid ended
Hopefully someone has a solution?
Thanks in advance,