Import is case sensitive, fails on data exported from same version #5028

Closed
opened 2025-12-29 19:23:19 +01:00 by adam · 3 comments
Owner

Originally created by @BCurrell on GitHub (Jun 23, 2021).

NetBox version

v2.11.7

Python version

3.8

Steps to Reproduce

  1. Create a site in Netbox, make sure the status is Active (this is the model and field I specifically had a problem with, I don't know if anything else is affected)
  2. Export the Sites to CSV
  3. Import the CSV to a second instance of Netbox

Expected Behavior

Sites get imported to new instance of Netbox

Observed Behavior

Row 1 status: Select a valid choice. Active is not one of the available choices.

Changing every instance of "Active" to "active" in the CSV resolves this problem

Originally created by @BCurrell on GitHub (Jun 23, 2021). ### NetBox version v2.11.7 ### Python version 3.8 ### Steps to Reproduce 1. Create a site in Netbox, make sure the status is Active (this is the model and field I specifically had a problem with, I don't know if anything else is affected) 2. Export the Sites to CSV 3. Import the CSV to a second instance of Netbox ### Expected Behavior Sites get imported to new instance of Netbox ### Observed Behavior ```none Row 1 status: Select a valid choice. Active is not one of the available choices. ``` Changing every instance of "Active" to "active" in the CSV resolves this problem
adam closed this issue 2025-12-29 19:23:19 +01:00
Author
Owner

@BCurrell commented on GitHub (Jun 23, 2021):

I'm currently migrating from a test instance of Netbox to a production instance. I'm copying some data over that is already accurate. So far I've exported and then imported:

  • Regions
  • Sites
  • Locations

The only model I had an issue with so far is Sites, but I've still got some more to go.

@BCurrell commented on GitHub (Jun 23, 2021): I'm currently migrating from a test instance of Netbox to a production instance. I'm copying some data over that is already accurate. So far I've exported and then imported: - Regions - Sites - Locations The only model I had an issue with so far is Sites, but I've still got some more to go.
Author
Owner

@jeremystretch commented on GitHub (Jun 23, 2021):

This is intended behavior. The bulk export function is intended to work with human-friendly values, whereas the CSV import function expects "raw" values (those that exist in the database). For example, the interface type "1000BASE-T (1GE)" uses the constant 1000base-t. This is done primarily to provide a consistent value without needing to worry about translation or having to preserve human-friendly punctuation and syntax. Each CSV import form provides a reference for all accepted values for such fields.

If you need to export these raw values, you can write a custom export template to do that.

@jeremystretch commented on GitHub (Jun 23, 2021): This is intended behavior. The bulk export function is intended to work with human-friendly values, whereas the CSV import function expects "raw" values (those that exist in the database). For example, the interface type "1000BASE-T (1GE)" uses the constant `1000base-t`. This is done primarily to provide a consistent value without needing to worry about translation or having to preserve human-friendly punctuation and syntax. Each CSV import form provides a reference for all accepted values for such fields. If you need to export these raw values, you can write a custom [export template](https://netbox.readthedocs.io/en/stable/additional-features/export-templates/) to do that.
Author
Owner

@BCurrell commented on GitHub (Jun 23, 2021):

Hi Jeremy,

Thanks for the info. Just to confirm, this is intended behavior when exporting to legacy CSV?

@BCurrell commented on GitHub (Jun 23, 2021): Hi Jeremy, Thanks for the info. Just to confirm, this is intended behavior when exporting to legacy CSV?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5028