Skip to content

// Scripts to backup/restore a Postgresql database contained into a Docker instance.

Notifications You must be signed in to change notification settings

Krospell/docker-postgres-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains template scripts allowing for Docker contained PSQL instances to be backed up and restored on-demand.

Usage

NOTA: This script must be run on the host with the database installed.

Configuration

See the .env file to configure the required values for backups and restorations.

Automation

You can automate the usage of this script by using a cronjob

0 0 * * * bash /home/sysadmin/docker-postgres-backup/backup.sh

Restoration

To restore a database, you first need to extract the dump file from it's archive. Then use:

# Make sure that you are in the dir where the script is stored
restore.sh my-database.dump

Maintainer: loan.joliveau@numigi.com

About

// Scripts to backup/restore a Postgresql database contained into a Docker instance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages