| ENV LOG_LEVEL | 1 to 8 | 8 | Level of verbosite. Most verbose is 0, less verbose is 8 |
| DBHOST | hostname | localhost | name of the db host to connect. |
| USERNAME | string | postgres | user used to connects to the db. |
| PASSWORD | string | empty | password for the user to connects to the db. Remember doing this you have the password in an environment variable. If you prefer to use Docker Secrets (I recommend this) don't define this env var or leave it blank, and go to the PASSWORD_SECRET environment variable. |
| PASSWORD_SECRET | docker secret name | empty | contains the name of the secret file where to read the password using docker secrets. Note: if this variable is defined, PASSWORD value will be ignored. |
| DBNAMES | list of dbnames separated by whitespace | all | List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3". | |
| DBEXCLUDE | list of dbnames separated by whitespace | empty | List of DBNAMES to EXLUCDE if DBNAMES are set to all |
| CREATE_DATABASE | yes or no | yes | Include CREATE DATABASE in backup? |
| SEPDIR | yes or no | yes | Separate backup directory and file for each DB? |
| DOWEEKLY | 1 to 7 | 6 | Which day do you want weekly backups? (1 to 7 where 1 is Monday) |
| GLOBALS_OBJECTS: pseudo database name used to dump global objects (users, roles, tablespaces). default postgres_globals. |
| COMMCOMP | 0 to 9 | 0 | Compress communications between backup server and PostgreSQL server? set compression level from 0 to 9 (0 means no compression) |
You need to configure also the script using a configuration file, it's self described so take a look
and read the options [autopostgresqlbackup](autopostgresqlbackup.conf)