Giter Site home page Giter Site logo

abdul-kowy / postgresql-pgbackrest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from muratgozel/postgresql-pgbackrest

0.0 0.0 0.0 27 KB

Docker image for PostgreSQL with pgBackRest backup/restore tool.

License: MIT License

Shell 37.20% Dockerfile 62.80%

postgresql-pgbackrest's Introduction

postgresql-pgbackrest

A docker file that installs postgresql along with pgbackrest. Image size is ~340MB

Usage

A pgbackrest.conf file is required as you can find a sample of it inside the pgbackrest directory. Refer to the pgbackrest documentation for configuration options.

This is a docker image and available on Github Packages. Just pull it. Sample docker-compose file:

version: "3.9"

networks:
  testnet:
    driver: bridge

volumes:
  pgbackrest_logs:
  postgresql_data:

services:
  postgresql:
    container_name: postgres01
    image: ghcr.io/muratgozel/postgresql-pgbackrest:latest
    build:
      context: ./postgresql
    ports:
      - "127.0.0.1:5432:5432"
    volumes:
      - './somedir/pgbackrest:/etc/pgbackrest'
      - 'pgbackrest_logs:/var/log/pgbackrest'
      - 'postgresql_data:/usr/local/pgsql/data'
    networks:
      - testnet
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped

If you want store pgbackrest backups on the host machine add a volume:

- 'pgbackrest_data:/var/lib/pgbackrest'

Create a volume under data directory and execute some sql scripts inside of it.

docker exec postgres01 su-exec postgres psql -h 127.0.0.1 -U postgres -d [DBNAME] -f /data/schema.sql

Version management of this repository done by releaser ๐Ÿš€

postgresql-pgbackrest's People

Contributors

muratgozel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.