kartoza / docker-pg-backup

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

Start script running with these environment options PG_ENV=/pgenv.sh #52

Closed albandum closed 2 years ago

albandum commented 2 years ago

Hi,

I'm running a very simple version of the s3 docker-compose that you added :

version: '2.1'

volumes:
  db-data:

services:
  dbbackups:
    image: kartoza/pg-backup:11.0
    environment:
      - DUMPPREFIX=staging
      - POSTGRES_DBNAME=xx
      - POSTGRES_HOST=xx
      - POSTGRES_USER=xx
      - POSTGRES_PASS=xx
      - POSTGRES_PORT=5432
      - STORAGE_BACKEND="S3"
      - ACCESS_KEY_ID=xx
      - SECRET_ACCESS_KEY=xx
      - DEFAULT_REGION=eu-west-1
      - BUCKET=xx
      - HOST_BASE=
      - HOST_BUCKET=
      - SSL_SECURE=True
      - REMOVE_BEFORE=90
      - CRON_SCHEDULE='*/2 * * *'
      - DUMP_ARGS='-Fc'
    restart: on-failure

But it's just hanging telling me this :

➜ pg-backups docker-compose up Recreating pg-backups_dbbackups_1 ... done Attaching to pg-backups_dbbackups_1 dbbackups_1 | Start script running with these environment options dbbackups_1 | PG_ENV=/pgenv.sh

I'm not even sure if this is an error or just a log line, but nothing's showing up in my s3 bucket. Did I do something wrong in the docker-compose file? Thanks a lot!

NyakudyaA commented 2 years ago

Hi,

I'm running a very simple version of the s3 docker-compose that you added :

version: '2.1'

volumes:
  db-data:

services:
  dbbackups:
    image: kartoza/pg-backup:11.0
    environment:
      - DUMPPREFIX=staging
      - POSTGRES_DBNAME=xx
      - POSTGRES_HOST=xx
      - POSTGRES_USER=xx
      - POSTGRES_PASS=xx
      - POSTGRES_PORT=5432
      - STORAGE_BACKEND="S3"
      - ACCESS_KEY_ID=xx
      - SECRET_ACCESS_KEY=xx
      - DEFAULT_REGION=eu-west-1
      - BUCKET=xx
      - HOST_BASE=
      - HOST_BUCKET=
      - SSL_SECURE=True
      - REMOVE_BEFORE=90
      - CRON_SCHEDULE='*/2 * * *'
      - DUMP_ARGS='-Fc'
    restart: on-failure

But it's just hanging telling me this :

➜ pg-backups docker-compose up Recreating pg-backups_dbbackups_1 ... done Attaching to pg-backups_dbbackups_1 dbbackups_1 | Start script running with these environment options dbbackups_1 | PG_ENV=/pgenv.sh

I'm not even sure if this is an error or just a log line, but nothing's showing up in my s3 bucket. Did I do something wrong in the docker-compose file? Thanks a lot!

I am not even sure the S3 bucket logic is incorporated against the 11 images. Maybe you could backport it. But generally, the backup happens at midnight

NyakudyaA commented 2 years ago

Not backported to 11 image