Skip to content

Merge 2 netbox instances #6843

Answered by candlerb
PieterL75 asked this question in Q&A
Discussion options

You must be logged in to vote

There was a brief discussion on google here. In short: it's not easy.

You certainly won't be able to use CSV export/import for this. You could code something in Python which uses either the Django ORM (a bit fiddly to connect to two databases simultaneously) or the REST API (no transactions). Or you can do a direct SQL dump and import, but you'll have to deal with renumbering all the clashing object IDs.

I think that to be robust, you would want to use database transactions. Via the REST API it's currently very difficult to create a linked set like

device ---< interface ---< IPAddress
       >----(primary_ip)--'

Typically you will need to do:

  • create(device)
  • create(interface assigned to …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ryanmerolle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants