Skip to content

Instantly share code, notes, and snippets.

@hackedunit
hackedunit / db_backup.sh
Last active May 12, 2024 13:45
Backup PostgreSQL dump to Microsoft Azure Blob Storage
#!/bin/bash
# Requires azure-cli to be installed
source $HOME/.profile
if [ "${POSTGRES_HOST}" = "" ]; then
if [ -n "${POSTGRES_PORT_5432_TCP_ADDR}" ]; then
POSTGRES_HOST=$POSTGRES_PORT_5432_TCP_ADDR
POSTGRES_PORT=$POSTGRES_PORT_5432_TCP_PORT