panic icon indicating copy to clipboard operation
panic copied to clipboard

Mongo DB backup

Open colossus-digital opened this issue 3 years ago • 4 comments

I'm still using the panic v1.2.1 because i'm not confident to upgrade to a newer version yet and first of all i'd like to have a backup of my db.

Is there a way to backup the entire panic's mongo db ?

I tried using some tools but the main problem is that i cannot authenticate to the db. What are the credentials to connect to the db?

tnks

colossus-digital avatar Jan 31 '23 12:01 colossus-digital

@itsciccio

dillu24 avatar Feb 08 '23 08:02 dillu24

PANIC's MongoDB has not authentication set. The only requirement imposed is that it can only be accessed inside the panic internal network (i.e. by panic only).

If you want a backup of the DB you'd need to set a volume inside docker-compose for the db data. We had it in previous versions for PANIC, but forgot to add it for the latest versions. I suggest having a look at the docker compose file for the older versions

dillu24 avatar Feb 08 '23 08:02 dillu24

authentication removed from the command and it worked , tnks

docker exec -i mongo /usr/bin/mongodump --db panicdb --out /dump
docker cp mongo:/dump ./dump

but I can't find an older version of the docker compose, could you point me to right one, please ?

colossus-digital avatar Feb 14 '23 11:02 colossus-digital

@colossus-digital https://github.com/SimplyVC/panic/blob/4a016c92f3f3c618989d964a31edb450ddba7517/docker-compose.yml

Take a look at db-data.

dillu24 avatar Feb 16 '23 17:02 dillu24