mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-06-19 17:40:22 +02:00
Updated Troubleshooting (markdown)
parent
7417ba0ee2
commit
127e4eb38f
@ -44,7 +44,7 @@ Enter the Netbox shell, e.g. to get access to `./manage.py`:
|
|||||||
docker-compose exec netbox /bin/bash
|
docker-compose exec netbox /bin/bash
|
||||||
```
|
```
|
||||||
|
|
||||||
### Database operations
|
### Database Operations
|
||||||
|
|
||||||
Access the database:
|
Access the database:
|
||||||
|
|
||||||
@ -64,6 +64,22 @@ Restore that database:
|
|||||||
gunzip -c db_dump.sql.gz | docker exec -i $(docker-compose ps -q postgres) sh -c 'psql -U $POSTGRES_USER $POSTGRES_DB'
|
gunzip -c db_dump.sql.gz | docker exec -i $(docker-compose ps -q postgres) sh -c 'psql -U $POSTGRES_USER $POSTGRES_DB'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### File Operations
|
||||||
|
|
||||||
|
Backup of the _media_ directory, which contains uploaded images.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose exec netbox tar c -jf - -C /opt/netbox/netbox/media ./ > media-backup.tar.bz2
|
||||||
|
```
|
||||||
|
|
||||||
|
Restore of the _media_ directory:
|
||||||
|
|
||||||
|
> ⚠️ This may overwrite files in the media directory!
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose exec -T netbox tar x -jvf - -C /opt/netbox/netbox/media < media-backup.tar.bz2
|
||||||
|
```
|
||||||
|
|
||||||
### Nginx doesn't start
|
### Nginx doesn't start
|
||||||
|
|
||||||
As a first step, stop your docker-compose setup.
|
As a first step, stop your docker-compose setup.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user