Looking for instructions to upgrade Debian 11 Bullseye OS and LibreNMS v22.9.0-3 to current stable version

Hello LibreNMS community,

first time poster here. I was a bit overwhelmed by the search results trying to find out what could go wrong and how-to update my Debian 11 old LibreNMS installation.

Could maybe someone push me in the right direction?
TIA for any hints to links/tutorials.

Version	22.9.0-3-g06c361c2b - Thu Sep 29 2022 06:32:10 GMT+0200
Database Schema	2022_09_03_091314_update_ports_adsl_table_with_defaults (246)
Web Server	Apache/2.4.54 (Debian)
PHP	7.4.33
Python	3.9.2
Database	MariaDB 10.5.15-MariaDB-0+deb11u1
Laravel	8.83.23
RRDtool	1.7.2
root@NMS:~# lsb_release --all
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
 Devices	36	 Ports	420
 IPv4 Addresses	64	 IPv4 Networks	15
 IPv6 Addresses	0	 IPv6 Networks	0
 Services	0	 Applications	2
 Processors	54	 Memory	54
 Storage	56	 Disk I/O	120
 HR-MIB	382	 Entity-MIB	0
 Syslog Entries	0	 Eventlog Entries	592816
 Sensors	535	 Wireless Sensors	90
 Toner	49	

That won’t be an easy one, but basically, in order I would suggest :

  • Snapshot your server or clone it to be able to try and fail a couple of times :slight_smile:
  • Disable all cron tasks of LibreNMS
  • Upgrade your OS to your final target, and check that it matches current LibreNMS prerequisites
  • check/redo all PHP-FPM configuration according to the new install manual
  • run ~/daily.php to upgrade all your LibreNMS code to support newer PHP. Probably 2 passes will be needed at least
  • run ~/validate.php to check how bad the situation is, and fix it step by step.
  • reactivate your cron tasks.

When done, remember to maintain your LibreNMS instance in autoupdate mode to avoid this :slight_smile:


Here a hint about the python venv pip issue: Python module validation errors after clean install on Debian 12 · Issue #15051 · librenms/librenms · GitHub

1 Like

First things first! Thank you, @PipoCanaja for your help! :slight_smile:

Regarding you suggesting from above. You are referencing this right? Installing LibreNMS - LibreNMS Docs


Thank you, @slalomsk8er ! I will definitely have an eye on it!

Just one question: Should I back up the database separately so that I can restore it to a new installation as a further option if it doesn’t work?

Database backups are always a good idea.

1 Like

Challenging I would say. Challenging because the saved DB won’t have the right structure (being so old) so you’ll have a lot (and I mean it) of manual actions to get the migration scripts running on the DB after reimport to make it right.
I think normal upgrade will be easier.

1 Like

Actually, I would also agree to do an upgrade/ new installation, but I would like to keep all the SNMP devices that have already been entered. History of those devices would not be that important to me.

Hi @Tubeling
You can then extract all the details from the devices table in the database. That will include device (hostname/ip, snmp settings, etc etc) and create a small script to reimport them in your new install. That would indeed be simpler and faster, and you would start for sure on a clean base.
Don’t forget to keep auto-update enabled as this is the best way to keep your setup … well … up to date :smiley:

1 Like

Hello @PipoCanaja

This time I will definitely keep the auto-update enabled! :slight_smile:
But unfortunately, I am not able to extract the data from the dump/database myself or write a script to do so. Is there perhaps already such a script somewhere that can be customised by me?

I am running into the following error after upgrading to Debian 12 including all your mentioned steps above and following the current LibreNMS install docs:

A hint what to do would be great.

Try to unlock phpsan1 in apt and maybe ask also in Discord

1 Like

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