Can't rebuild database? #1384

Closed
opened 2025-12-29 16:31:57 +01:00 by adam · 1 comment
Owner

Originally created by @jondkelley on GitHub (Nov 3, 2017).

I am running netbox 2.2.2 and set things up on a VM and can't migrate this to a production database.

I run python3 manage.py migrate and get a blank database, and then pg_dump netbox --column-inserts --data-only > /tmp/x1.sql from my development server.

Importing the data on production causes errors, but no data imports. I'm concerned this app is not portable beyond the original installation?

ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(872) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(873) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(874) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(875) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(876) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(877) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(878) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(879) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(880) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
DETAIL: Key (id)=(881) already exists.
ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"

Originally created by @jondkelley on GitHub (Nov 3, 2017). I am running netbox 2.2.2 and set things up on a VM and can't migrate this to a production database. I run python3 manage.py migrate and get a blank database, and then ```pg_dump netbox --column-inserts --data-only > /tmp/x1.sql``` from my development server. Importing the data on production causes errors, but no data imports. I'm concerned this app is not portable beyond the original installation? ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(872) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(873) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(874) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(875) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(876) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(877) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(878) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(879) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(880) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey" DETAIL: Key (id)=(881) already exists. ERROR: duplicate key value violates unique constraint "extras_useraction_pkey"
adam closed this issue 2025-12-29 16:31:57 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 3, 2017):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using the template provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list.

@jeremystretch commented on GitHub (Nov 3, 2017): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using the template provided [here](https://raw.githubusercontent.com/digitalocean/netbox/develop/.github/ISSUE_TEMPLATE.md). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1384