kartoza / docker-pg-backup

A cron job that will back up databases running in a docker postgres container
GNU General Public License v2.0
466 stars 104 forks source link

DB_TABLES - no effect #105

Open eleagula opened 3 days ago

eleagula commented 3 days ago

What is the bug or the crash?

When running docker-pg-backup on Kubernetes, I've tried setting DB_TABLES to true in a configmap. However, setting this environment variable appears to have no effect. Instead of tables being exported, I see full backup dump files being created. In the start.sh file, I don't see the DB_TABLES env variable exported. Would it be possible to get DB_TABLES to function?

Steps to reproduce the issue

I have the pg-backer container connecting to an Azure Postgresql instance version 16.4 Here's the configmap.

kind: ConfigMap
apiVersion: v1
metadata:
  name: pgbackup-configmap-kartoza-tables
  namespace: postgres
data:
  CRON_SCHEDULE: '0 2 * * *'
  DB_TABLES: "true"

Versions

17-3.5

Additional context

No response

NyakudyaA commented 20 hours ago

I think we need to explicitly define Dump_tables=True and then export it. Feel free to submit a PR otherwise I can tackle this and add a unit test as well when I get free time