Skip to content

Instantly share code, notes, and snippets.

View ahilles107's full-sized avatar

Paweł Mikołajczuk ahilles107

View GitHub Profile
@RavenXce
RavenXce / dokku-postgres-backup-daily.sh
Last active December 27, 2020 14:18
Daily postgres backup for dokku
#! /bin/bash
# directory to save backups in, must be rwx by postgres user
BASE_DIR="/var/backups/dokku-postgres"
YMD=$(date "+%Y-%m-%d")
DIR="$BASE_DIR/$YMD"
# make dir if it doesn't exist
mkdir -p $DIR
cd $DIR