Replies: 2 comments 1 reply
-
This is really a more general question, "how do I upgrade applications deployed using docker"? The short answer is, you don't. You never modify or upgrade an application within an existing container. Instead, you delete and recreate the container from a new image, which contains the new version of the application. The application needs to be deployed in such a way that its persistent state is kept in a data volume, so when the new version starts up, it will find the old data. If you look at the
As it happens, you don't want to upgrade Postgres at the moment, only Netbox. But if you did, you can see that the data directory Now, 90% of Netbox's state is kept in Postgres, so having Postgres data preserved solves most of the problem. The rest is in Netbox's media directory (for uploaded images), any scripts and reports you create, and I suppose also redis if you're worried about preserving history of job executions. Again, looking in
So in summary: you just redeploy the brand new version of Netbox, using a new container image which was built from Netbox v3.3.8, and Bob's your uncle. |
Beta Was this translation helpful? Give feedback.
-
Ok , some how i understood that i need to downloads gzip file and do some manually stuff or reclone the git repo. But of course that i need to take the new netbox-image in the compose. like daaa. Thanks guys for take me out of the stupidity zone :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Everyone,
I have recently installed netbox 3.3.7 via docker compose
The 3.3.8 is out but there is no manual how to upgrade composed netbox containers
I have went through the manual gui from https://docs.netbox.dev/en/stable/installation/upgrading/
The container to be upgraded through is the netbox-docker-netbox-worker if trying to do it manually
some files from tar.gz is not there by default - venv is even not there
Can you put a handover for how to do it?
Also you didnt merge this version yet so when asked to clone the git repo it says its already says " Branch already updated"
Because then it will be easy just to do the followings steps:
2. take sql dump :
docker exec -t POSTGRES_CONTAINER_ID pg_dumpall -c -U netbox > dump_
date +%d-%m-%Y""%H%M_%S.sql
3. Go to /opt/netbox-docker/ {go to the netbox docker git directory} then Stop netbox-docker
docker-compose down
Rename docker-composer.yml and configuration/ldap_config.py
Pull the latest netbox from the git repository
git pull origin release
docker-compose rm -fs netbox netbox-worker postgres
docker-compose pull
8.Clean up old data
docker volume rm netbox-docker_netbox-postgres-data
docker volume rm netbox-docker_netbox-static-files
Restore postgres database content
docker-compose up postgres' 'cat your_dump.sql | docker exec -i POSTGRES_CONTAINER_ID psql -U netbox
Finally, bring everything up a
docker-compose up -d
Beta Was this translation helpful? Give feedback.
All reactions