Upgrading Netbox - Error #1344

Closed
opened 2025-12-29 16:31:36 +01:00 by adam · 4 comments
Owner

Originally created by @exabyte4 on GitHub (Oct 22, 2017).

Hello,

I'm running Netbox v2.1.4 and decided to upgrade to the latest one (2.2.2).
While the upgrade succeeds and I am able to access via the web, I can't
access ANY device.
I get an error (see attached) and a Log (details obscured).

Luckily, I took a snapshot before the upgrade, so no harm done.
22-10-2017 10-39-11

Originally created by @exabyte4 on GitHub (Oct 22, 2017). Hello, I'm running Netbox v2.1.4 and decided to upgrade to the latest one (2.2.2). While the upgrade succeeds and I am able to access via the web, I can't access ANY device. I get an error (see attached) and a [Log](https://github.com/digitalocean/netbox/files/1404701/Log.txt) (details obscured). Luckily, I took a snapshot before the upgrade, so no harm done. ![22-10-2017 10-39-11](https://user-images.githubusercontent.com/23014415/31859509-c34cdf64-b715-11e7-9819-70405e6b92c4.png)
adam closed this issue 2025-12-29 16:31:36 +01:00
Author
Owner

@RyanBreaker commented on GitHub (Oct 22, 2017):

Did you run ./manage.py migrate?

@RyanBreaker commented on GitHub (Oct 22, 2017): Did you run `./manage.py migrate`?
Author
Owner

@exabyte4 commented on GitHub (Oct 22, 2017):

Thank you.

I noticed it was running as part of the upgrade.sh, only to see the following message:
"Exception: PostgreSQL 9.4.0 or higher is required (9.2.23 found). Upgrade PostgreSQL and then run migrations again."

I realize this is a bit 'out-of-scope', but is there a way to upgrade PostgreSQL efficiently?
I'm running on CentOS 7.

@exabyte4 commented on GitHub (Oct 22, 2017): Thank you. I noticed it was running as part of the upgrade.sh, only to see the following message: **"Exception: PostgreSQL 9.4.0 or higher is required (9.2.23 found). Upgrade PostgreSQL and then run migrations again."** I realize this is a bit 'out-of-scope', but is there a way to upgrade PostgreSQL efficiently? I'm running on CentOS 7.
Author
Owner

@RyanBreaker commented on GitHub (Oct 22, 2017):

Your best bet is to follow this guide on the Postgresql wiki to install the postgresql96-server package: https://wiki.postgresql.org/wiki/YUM_Installation

Do not forget to backup your database, however it seems that according to the data directory section, it doesn't overwrite the old version's data, but puts it in a separate directory, so you may be able to get away with just copying the original data directory to 9.6, but I have not tested this myself. Take care as well as it seems the packages don't conflict and multiple versions are able to be installed simultaneously, which should only be a problem for starting and stopping the services for how they can conflict on the network port.

Any additional help you'll need to contact the CentOS or PostgreSQL communities for, both of which I know have active IRC channels, since this is outside the scope of this project. Good luck.

@RyanBreaker commented on GitHub (Oct 22, 2017): Your best bet is to follow this guide on the Postgresql wiki to install the `postgresql96-server` package: https://wiki.postgresql.org/wiki/YUM_Installation **Do not forget to backup your database**, however it seems that according to the [data directory section](https://wiki.postgresql.org/wiki/YUM_Installation#Data_Directory), it doesn't overwrite the old version's data, but puts it in a separate directory, so you may be able to get away with just copying the original `data` directory to 9.6, but I have not tested this myself. Take care as well as it seems the packages don't conflict and multiple versions are able to be installed simultaneously, which should only be a problem for starting and stopping the services for how they can conflict on the network port. Any additional help you'll need to contact the CentOS or PostgreSQL communities for, both of which I know have active IRC channels, since this is outside the scope of this project. Good luck.
Author
Owner

@exabyte4 commented on GitHub (Oct 22, 2017):

OK, Thanks. I'll follow it.
Appreciate it!

@exabyte4 commented on GitHub (Oct 22, 2017): OK, Thanks. I'll follow it. Appreciate it!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1344