Migration to another machine - git checkout #11841
Replies: 4 comments
-
You might want to read a little about git and other tools so that you can not only follow written directions but understand what the tool is doing an why so you know when to change it to fit your situation.
I think you want to drop the '--depth 1' from your clone so you get all the history and not just the most recent version, so all the objects are in the git database to checkout v3.3.2, if you want to install the new system with an older version of Netbox. If you don't have any dependancies on the old version though, such as external scripts which need to be updated due to breaking API changes or procedure and documentation changes for your team, there should be no problem with installing the current release and allowing it to upgrade the db schema on your new system as part of the install/upgrade process. If you are already on a 3.x version you don't need a stepwise upgrade to get to the current version, only if you are starting from older than 2.11.
It sounds like you could do all your testing on your new system while leaving the existing 3.3.2 install in place until you are confident the new one is working and your install/upgrade procedure is correct, so there should be low risk.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: uRhaineWork ***@***.***>
Sent: Monday, February 27, 2023 6:33 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] Migration to another machine - git checkout (Discussion #11841)
Hi,
I'm in situation with netbox version 3.3.2, psql version 10 and a Alma machine with broken yum.
What I want to do is to install netbox on new machine with alma 9.1, (psql as default is 13.7).
I kinda know how to do database migration part with pg_dump, but I'm stuck at very beginning - installing the same netbox version to the new machine. For someone with limited linux knowledge point in official guide isn't much useful, there's co clear example, nor in google did I found one.
Installation via git also allows you to easily try out different versions of NetBox. To check out a specific NetBox release<https://github.com/netbox-community/netbox/releases>, use the git checkout command with the desired release tag. For example, git checkout v3.0.8.
Where do use this git checkout v3.3.2 command and when? Im at a point from official guide:
sudo git clone -b master --depth 1 https://github.com/netbox-community/netbox.git
(done)
I dont want to use the Option A way of doing things, as its more complicated and probably not as automatic at upgrades.
I did git checkout v3.3.2
but the response is:
fatal: not a git repository (or any of the parent directories): .git
—
Reply to this email directly, view it on GitHub<#11841>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UMYNRPHGV3VRADN2DT3WZSNLJANCNFSM6AAAAAAVJK6P2Y>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If you want to stick with v3.3.2, then you would do this:
Remove the |
Beta Was this translation helpful? Give feedback.
-
As MTinber suggested migration from 3.3.2 to 3.4.5 went without bigger hickups. One thing to notice is you need to do a reindex command to be able to search in imported data base. I've found on reddit: An |
Beta Was this translation helpful? Give feedback.
-
All the commands that are required to run on install/upgrade are in the upgrade.sh script, so you shouldn't have to search reddit to find out
# Rebuild the search cache (lazily)
COMMAND="python3 netbox/manage.py reindex --lazy"
echo "Rebuilding search cache ($COMMAND)..."
eval $COMMAND || exit 1
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: uRhaineWork ***@***.***>
Sent: Thursday, March 2, 2023 1:59 AM
To: netbox-community/netbox ***@***.***>
Cc: Mark Tinberg ***@***.***>; Comment ***@***.***>
Subject: Re: [netbox-community/netbox] Migration to another machine - git checkout (Discussion #11841)
As MTinber suggested migration from 3.3.2 to 3.4.5 went without bigger hickups. One thing to notice is you need to do a reindex command to be able to search in imported data base. I've found on reddit:
python3 manage.py reindex --lazy
python3 manage.py reindex
An
—
Reply to this email directly, view it on GitHub<#11841 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UMYDIWBBBTXQO65T4MLW2BHMZANCNFSM6AAAAAAVJK6P2Y>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm in situation with netbox version 3.3.2, psql version 10 and a Alma machine with broken yum.
What I want to do is to install netbox on new machine with alma 9.1, (psql as default is 13.7).
I kinda know how to do database migration part with pg_dump, but I'm stuck at very beginning - installing the same netbox version to the new machine. For someone with limited linux knowledge point in official guide isn't much useful, there's no clear example, nor in google did I found one.
Installation via git also allows you to easily try out different versions of NetBox. To check out a specific NetBox release, use the git checkout command with the desired release tag. For example, git checkout v3.0.8.
Where do use this git checkout v3.3.2 command and when? Im at a point from official guide:
sudo git clone -b master --depth 1 https://github.com/netbox-community/netbox.git
(done)
I dont want to use the Option A way of doing things, as its more complicated and probably not as automatic at upgrades.
I did git checkout v3.3.2
but the response is:
fatal: not a git repository (or any of the parent directories): .git
Beta Was this translation helpful? Give feedback.
All reactions