k0lter / autopostgresqlbackup

Automated tool to make periodic backups of PostgreSQL databases
52 stars 17 forks source link

Problem in v2: $OPTS also passed to pgdumpall, so -Fc fails #12

Closed hyperman2 closed 1 year ago

hyperman2 commented 1 year ago

We run the debian/ubuntu version of this script with option -Fc to create .pgdump files instead of .sql files. In the v2 version, this fails: $OPTS is not only passed to pg_dump, but also to pg_dumpall. And theoptions for these 2 programs are not the same.

I'd suggest passing OPTS to only pg_dump, and add a new config variable OPS_PGDUMPALL or something.

Related bonus issue: the v1.1 version does not support pg_dump -Fd (which would allow parallel backups): changing rights on a directory failed.

k0lter commented 1 year ago

You're right, I will separate OPTS for pg_dump and pg_dumpall

I will also take a look for -Fd option

k0lter commented 1 year ago

I've pushed a fixed.

See Changelog for the new options.

hyperman2 commented 1 year ago

This works perfectly. Thanks.