I am trying to update the MariaDB as per the latest release of LibreNMS. However during update something went wrong and the NMS is down now. Few details are as follows.
bash-4.2$ ./daily.sh
Fetching new release information OK
Updating to latest release OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
bash-4.2$ ./validate.php
Component | Version |
---|---|
LibreNMS | 21.4.0 |
DB Schema | 2021_02_09_122930_migrate_to_utf8mb4 (204) |
PHP | 7.4.12 |
Python | 3.6.8 |
MySQL | 10.5.9-MariaDB |
RRDTool | 1.4.8 |
SNMP | NET-SNMP 5.7.2 |
====================================
[OK] Composer Version: 2.0.12
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
bash-4.2$ ./lnms migrate
-
Application In Production! *
Do you really wish to run this command? (yes/no) [no]:
yes
Migrating: 2021_03_11_003540_rename_toner_table
In Connection.php line 678:
SQLSTATE[42S02]: Base table or view not found: 1146 Table âlibrenms.tonerâ doesnât exist (SQL: rename table toner
to printer_supplies
)
In Exception.php line 18:
SQLSTATE[42S02]: Base table or view not found: 1146 Table âlibrenms.tonerâ doesnât exist
In PDOStatement.php line 112:
SQLSTATE[42S02]: Base table or view not found: 1146 Table âlibrenms.tonerâ doesnât exist
bash-4.2$ ./lnms migrate --pretend
-
Application In Production! *
Do you really wish to run this command? (yes/no) [no]:
yes
RenameTonerTable: rename table toner
to printer_supplies
In SchemaException.php line 86:
There is no column with name âtoner_idâ on table âprinter_suppliesâ.
bash-4.2$
While checking the Database, I found that âprinter_suppliesâ or âtonerâ table is not there at all. Can someone help me provide command to create the table again. ( I am not DB or Linux expert ) Moreover there is a missing âSyslogâ table as well.
Can someone provide the commands to recreate those tables, so I can move ahead in migration / troubleshoot .
Bhargav