This repository contains template scripts allowing for Docker contained PSQL instances to be backed up and restored on-demand.
NOTA: This script must be run on the host with the database installed.
See the .env
file to configure the required values for backups and restorations.
You can automate the usage of this script by using a cronjob
0 0 * * * bash /home/sysadmin/docker-postgres-backup/backup.sh
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