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

allready have postgres docker how to use it with a allreaddy runing psql #72

Closed cchalifo999 closed 1 year ago

NyakudyaA commented 1 year ago

If your service is running on a host like foo.data.com you can substitute that in the backup service https://github.com/kartoza/docker-pg-backup/blob/master/docker-compose.yml#L23

  environment:
      - DUMPPREFIX=PG_gis
      - POSTGRES_HOST=foo.data.com
      - POSTGRES_USER=docker
      - POSTGRES_PASS=docker
      - POSTGRES_PORT=5432

or if you are running on localhost you will need to use https://stackoverflow.com/questions/29076194/using-add-host-or-extra-hosts-with-docker-compose to expose the hosts defined in /etc/hosts within the container

cchalifo999 commented 1 year ago

If your service is running on a host like foo.data.com you can substitute that in the backup service https://github.com/kartoza/docker-pg-backup/blob/master/docker-compose.yml#L23

  environment:
      - DUMPPREFIX=PG_gis
      - POSTGRES_HOST=foo.data.com
      - POSTGRES_USER=docker
      - POSTGRES_PASS=docker
      - POSTGRES_PORT=5432

or if you are running on localhost you will need to use https://stackoverflow.com/questions/29076194/using-add-host-or-extra-hosts-with-docker-compose to expose the hosts defined in /etc/hosts within the container

ty for the replay and help cuse i was ussing authentik docker