Giter Site home page Giter Site logo

postgres-azure-backup's Introduction

postgres-azure-backup

Image prepared to backup PostgreSQL database to Microsoft Azure.

This image is heavily based on iainmckay/docker-mysql-backup.

There is a custom build available on the public registry at neowaylabs/postgres-azure-backup.

Backing up

To backup run:

$ docker run -e AZURE_STORAGE_ACCOUNT=account -e AZURE_STORAGE_ACCESS_KEY=key -e AZURE_STORAGE_CONTAINER=container -e POSTGRES_HOST=127.0.0.1 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=password neowaylabs/postgres-azure-backup backup

You can provide an extra argument with a specific database to backup.

Restoring

To restore an existing backup run:

$ docker run -e AZURE_STORAGE_ACCOUNT=account -e AZURE_STORAGE_ACCESS_KEY=key -e AZURE_STORAGE_CONTAINER=container -e POSTGRES_HOST=127.0.0.1 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=password neowaylabs/postgres-azure-backup restore

It is important to note that if this database already exists on your server, this process will drop it first. You can also provide an extra argument with a specific database to restore.

Configuration

The container can be customized with these environment variables:

Name Default Value Description
AZURE_STORAGE_ACCOUNT blank Your Azure storage account name to keep the backup
AZURE_STORAGE_ACCESS_KEY blank Your Azure storage access key to access the storage account
AZURE_STORAGE_CONTAINER blank The Azure storage container to keep the backup
POSTGRES_HOST blank Address the Postgres server is accessible at
POSTGRES_PORT blank Port the Postgres server is accessible on
POSTGRES_USER blank User to connect as
POSTGRES_PASSWORD blank Password to use when connecting

postgres-azure-backup's People

Contributors

vitorarins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.