How to backup photo's in Netbox docker container #1348
Unanswered
alittle3
asked this question in
Getting Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm running Netbox version v4.0.9 as a docker container. I'm setting up a replacement server and want to copy the information to the new server. I can run the following commands and back up everything except pictures.
Only start the DB
docker compose up -d postgres
Take a DB backup
docker compose exec -T postgres sh -c 'pg_dump -cU $POSTGRES_USER $POSTGRES_DB' | gzip > db_dump.sql.gz
Stop the database
docker compose down
Restore the database
docker compose up -d postgres
gunzip -c db_dump.sql.gz | docker compose exec -T postgres sh -c 'psql -U $POSTGRES_USER $POSTGRES_DB'
How do you back up any pictures that you have put into Netbox?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions