In this post I will cover the process to upgrade a Netbox installation running in Docker. I will be upgrading from version 3.7.4 to version 4.3.4
When upgrading Netbox, as the software is based on Django it does a database upgrade so you have to follow this guide when moving between versions.
Guide to upgrading Netbox
When upgrading from earlier versions you have to follow these upgrade steps instead of going from one version directly to another.
When upgrading Netbox here are some key rules
You cannot skip a major version jump — for example, jumping from 2.10 straight to 3.x is not supported; you must land on a 2.11.y first
Final patch levels are crucial — always upgrade to the highest patch of your minor version before moving to the next major.
Schema migrations are consolidated — which is why major-version jumps require this sequential approach.
Please refer to this guide: https://netboxlabs.com/docs/netbox/installation/upgrading/
In my example of moving from 3.7.4 to latest I have to follow this approach
Ugrade Netbox Docker
This is the path I will be following based on the above information
Backup everything — DB, config files, media, scripts, etc.
From 3.7.4, upgrade to 3.7.8.
Upgrade from 3.7.8 to 4.0.11.
Apply successive upgrades: 4.0.11 → 4.1 latest → 4.2 latest → 4.3.4.
How update Netbox
1. Backup Netbox PostgreSQL Database
Whenever you are performing an upgrade always backup your current database.
To backup a Netbox database use the following command
# Replace with your actual DB name, user, and path
PGPASSWORD=netbox \
pg_dump -U netbox -h localhost -Fc netbox > /opt/backups/netbox_$(date +%F).dump
Netbox Upgrade Tips
Netbox Upgrade with Plugins
I found this great video on how to perform a Netbox Upgrade when you have Plugins
Netbox Upgrade Documentation
The netbox documentation can be found below
https://netbox.readthedocs.io/en/stable
The specific page for upgrading netbox is below
https://netbox.readthedocs.io/en/stable/installation/upgrading

Leave a Reply