Replies: 4 comments 11 replies
-
Use the postgres pg_dump to backup the database : |
Beta Was this translation helpful? Give feedback.
-
I installed psql v10 and I get error message below when I type "psql" on CLI. psql: could not connect to server: No such file or directory Should I manage psql within the docker container? or on local server? |
Beta Was this translation helpful? Give feedback.
-
This is my first time using netbox and postgres. After a lot of test try to find the correct data base and restore procedure I created the following script to generate the data base backup. It only work due to permission problem in /var/lib/postgresql/ and the restore should be do using postgres user. I used the as part of the backup the option --clean, because if you restore over the actual database it give you errors "tables already exist" sorry for my English because my firts languaje is spanish. The owner of this script should be postgres. #!/bin/sh **********************************************************************************************************05-jul-2023 DRMScript para correr backup de la base de datos de Netbox. Este script debe estar localizadoy debe correrse en el directorio /var/lib/postgresql. El script debe tener como ownership a postgres-rwxr--r-- 1 postgres postgres db_backup.shLa restauración de la base de datos debe hacerlo bajo el usuario de postgresus - postgrespostgres@netboxU20:~$ psql -e -d netbox < netbox-mysql-FECHA_DEL_BACKUP.sqlEl backup de la base de datos se guardara los ultimos 5 dias.**********************************************************************************************************N="netbox-mysql" BKP="/home/oberon" /usr/bin/su -c 'pg_dump -U postgres -F p --clean netbox > /var/lib/postgresql/db_clean.sql' postgres |
Beta Was this translation helpful? Give feedback.
-
I have this :
and in the /home/netbox folder I have
all ran from the 'netbox' crontab (3 times a day)
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm operating netbox through running docker-compose.
I'm wondering if there's a way to backup all data (e.g. IP addresses, Devices) on netbox.
I want to backup data every day or every week.
Here's the information when I type "docker ps -a" command on my netbox server.
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b3379a749353 netboxcommunity/netbox:v3.2-1.6.1 "/sbin/tini -- /opt/…" 2 months ago Up 2 months 0.0.0.0:8000->8080/tcp, :::8000->8080/tcp netboxdocker_netbox_1
bcd810b00e02 netboxcommunity/netbox:v3.2-1.6.1 "/sbin/tini -- /opt/…" 2 months ago Up 2 months netboxdocker_netbox-housekeeping_1
fc17e44536a7 netboxcommunity/netbox:v3.2-1.6.1 "/sbin/tini -- /opt/…" 2 months ago Up 2 months netboxdocker_netbox-worker_1
c3eb6d82b84e postgres:14-alpine "docker-entrypoint.s…" 2 months ago Up 2 months 5432/tcp netboxdocker_postgres_1
b16e3fb413e5 redis:6-alpine "docker-entrypoint.s…" 2 months ago Up 2 months 6379/tcp netboxdocker_redis-cache_1
feb69922effa redis:6-alpine "docker-entrypoint.s…" 2 months ago Up 2 months 6379/tcp netboxdocker_redis_1
Please help.
Beta Was this translation helpful? Give feedback.
All reactions