Netbox on CockroachDB #9455
DavidSouther
started this conversation in
General
Replies: 1 comment 7 replies
-
hi, thanks for the work, i used this to replicate your experience. But at the moment I'm get a data types error when starting netbox. did you have it? example error text from browser
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Yes, I know Netbox only officially supports Postgres :)
My SRE org will only support Cockroach DB.
In the hopes that it maybe helps someone, I am sharing here some notes on what I've done to get netbox running on crdb, and how I got an ISP's worth of DCIM/IPAM data out of our Postgres instance into our Cockroach cluster. Specifically, this migration was for Netbox version 3.2 on both sides, with some org internal plugins.
I hope this helps someone - there's a lot of dead ends & false starts I've hit over the past couple weeks on this, so please feel free to reach out w/ any questions & I'll see if I've come across it but not mentioned it here.
Patches to netbox upstream 3.2
netbox/netbox/settings.py
DB_ENGINE=django_cockroachdb
in the environmentnetbox/dcim/fields.py
netbox/ipam/fields.py
Migrating Data
Moving data from Postgres to Cockroach is... more difficult than I expected. pg_dump / IMPORT should work, but was running into a number of issues with integrity constraints. What I found worked better was exporting per-table to CSV, and then using IMPORT TABLE ... CSV DATA.
Beta Was this translation helpful? Give feedback.
All reactions