export headers are different than what import headers require #13140
-
I am exporting data from my 3.5.4 netbox and importing them into my 3.5.5 netbox. Is this something that as changed between the two versions? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
In general, it's impossible to use CSV export and import to transfer data between Netbox instances with any sort of fidelity. There are many things which can't be done this way, especially anything which involves foreign key relations where the target model doesn't have a unique name. Even transferring a device with its primary_ip can't be done directly: you'd have to import the devices, then import the interfaces, then import the IP addresses, then update the devices to set their primary_ip(4/6). Note also that the last step would also involve mapping between the original device ID and the new device ID, since the only way to update via CSV involves supplying the device ID, but the import process assigns new database IDs. You will be much better off simply doing a postgres dump and restore, and then re-running the
No, it's not a change: CSV export has never been compatible with CSV import. It's mentioned in the FAQ. If you want to export CSV in a format which is approximately compatible with import (such as using the correct column headers), then you have to write your own export templates. Here's an example for exporting cables in a structure for editing and reimporting - #11762, #12018. (Although that was before cables supported multiple terminations, and I'm not sure that you can import those via CSV). |
Beta Was this translation helpful? Give feedback.
In general, it's impossible to use CSV export and import to transfer data between Netbox instances with any sort of fidelity. There are many things which can't be done this way, especially anything which involves foreign key relations where the target model doesn't have a unique name. Even transferring a device with its primary_ip can't be done directly: you'd have to import the devices, then import the interfaces, then import the IP addresses, then update the devices to set their primary_ip(4/6). Note also that the last step would also involve mapping between the original device ID and the new device ID, …