I'm have a docker-compose with a postgres service, currently it only has one service but in the future it will contain more.
version: '3.8'
services:
postgres-dev:
image: postgres
environment:
POSTGRES_DB: dev_db
POSTGRES_USER: dev_user
POSTGRES_PASSWORD: dev_password
volumes:
- postgres-dev-data:/var/lib/postgresql/data
ports:
- "5433:5432"
volumes:
postgres-dev-data:
I learn that if i want to create a backup for this db i should run something like docker-compose exec --interactive -u <your_postgres_user> <service> pg_dump -Fc <database_name_here> > db.dump
So, my question is, where is the best place to save this db.dump? Is it okey to save it on another volume? What is the best practice to do it?
Is it possible to save it for example in a firebase storage?
Thanks!
I did not try anything yet, i just want to know from experienced people that have done it