Replies: 3 comments 5 replies
-
Looks good. My command is a little different but I've used it for a few migrations and it worked great each time. |
Beta Was this translation helpful? Give feedback.
-
Hi all, I'm having a few problems trying to get my db imported. I'm trying this on a test environment, I have set up 2 instances running Netbox. v1 has some data, v2 has nothing. When I do a dump on the db using the pg_dump --username netbox --password --host localhost netbox > netbox.sql it copies to file. I have extracted the file from the cli using WinScp, I then imported it into the new instance of Netbox, however when I try to run the below commands in the cli I get an error saying the user doesn't exist. psql -c 'drop database netbox' When I try to run the commands in the psql, the commands do not throw up any errors but also do not seem to work. It's most likely something simple, anyone any ideas? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
I'm planning a migration from Netbox v2.8.8 (PSQL 12.5) a new server running v3.5.8 (PSQL 15.2) Will I be able to use the pg_dump to migrate the database to a new server ? pg_dump -h localhost -U netbox -Fc netbox > netbox_db.dump |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm sure that this question has been asked many times before but I was just wondering whether I'm on the right path.
We currently run Netbox in a test environment & had planned to lift & shift but it turns out that isn't possible.
Is it possible to install the Netbox in the new location from start to finish (as oer install guide)
Exporting & Importing Netbox db:
Exporting the db from the current instance using:
pg_dump --username netbox --password --host localhost netbox > netbox.sql
Then loading the Exported db with the following commands?
psql -c 'drop database netbox'
psql -c 'create database netbox'
psql netbox < netbox.sql
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions