Skip to content

dockerfile used to build a image used to backup an postgres instance.

Notifications You must be signed in to change notification settings

cavamagie/autopgsqlbackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker based on debian that use a script autopgsqlbackup code written by Aaron Axelsen to manage a schedule backup of a postgres docker

autopgsqlbackup

Table of contents

Getting started

docker-compose.yml

  postgres:
    image: postgres:9.6
    ports:
      - "127.0.0.1:5432:5432"
    restart: unless-stopped
    volumes:
      - /pgdata:/var/lib/postgresql/data:Z
      - /pgbackup:/var/lib/postgresql/pgbackup:Z
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
      POSTGRES_DB: database
      PGDATA: /var/lib/postgresql/data/pgdata

  pgbackups2:
    image: cavamagie/autopgsqlbackup
    restart: unless-stopped
    volumes:
      - /pgbackup:/backups:Z
    links:
      - postgres
    depends_on:
      - postgres
    environment:
      POSTGRES_HOST: postgres
      POSTGRES_DB: database
      POSTGRES_USER: user
      PGPASSWORD: password

dafault backup rotation

 Daily Backups are rotated weekly..
 Weekly Backups are run by default on Saturday Morning when
 Weekly Backups are rotated on a 5 week cycle..
 Monthly Backups are run on the 1st of the month..
 Monthly Backups are NOT rotated automatically...
 It may be a good idea to copy Monthly backups offline or to another
 server..

dafault backup compression

gzip

About

dockerfile used to build a image used to backup an postgres instance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages