Backing up MariaDB to upgrade

I recently inherited a LibreNMS server that hasn’t been updated in a long time. I managed to get PHP and Python updated, but I’m having issues when trying to update the MariaDB.

  • Output of ./validate.php
    Component | Version
    --------- | -------
    LibreNMS | 21.12.0
    DB Schema | 2020_12_14_091314_create_port_group_port_table (199)
    PHP | 7.4.27
    Python | 3.6.9
    MySQL | 10.1.48-MariaDB-0ubuntu0.18.04.1
    RRDTool | 1.7.0
    SNMP | 5.7.3

[OK] Composer Version: 2.2.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] MariaDB version 10.2.2 is the minimum supported version as of March, 2021.
Update MariaDB to a supported version, 10.5 suggested.
[FAIL] Your database is out of date!
./lnms migrate

I’m using this command to try and backup the DB, but only get a list of options. I have tried with and without sudo. Am I missing something?

I guess a second question is can I just upgrade the DB without doing any kind of backup and not lose my data? I’m (obviously) not experienced with DB management, but will it pull the current database and just work or will it destroy the current DB? This is on a VM, so I can take a snapshot if the answer is it might work.

When i upgraded my installation to 10.2.37 i used these commands

# sudo mariabackup --backup --target-dir=/home/folder/ --user=root 

​# sudo mariabackup –prepare –target-dir=/home/folder/

Hope it helps

Yes, that did it! Thank you so much!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.