Is there a way to backup only the schemas (plus their relative data) of a PostgreSQL DB individually, into single dedicated files?
I'm on Linux CentOS 7, hopefully there's some way to automate this so I can make a cronjob and run the backups when I want!
I know pg_dump, I've checked and with it I think I can make a single file backup of all the schemas + data with this command:
pg_dump dbname -n -f backup.sql
but what I want is different, I want to separate all the schemas + data of the DB in single files. I have no idea how to achieve that with pg_dump... maybe using bash too? But I have no idea, I have never used bash in my life.
--schema=PATTERN dump the specified schema(s) only
I think that still saves everything into one single file.
Also, I don't want to specify all the schemas by hand, as they are a lot... I need them all, so I don't think I have to use