Skip to content

Instantly share code, notes, and snippets.

@Raul-mz
Raul-mz / backup.sh
Last active February 27, 2019 15:23
Automated Backup on Linux (Postgresql)
#!bin/bash
export PGPASSWORD="user1"
FILENAME="/DB/Backup_$(date +%Y%m%d%H%M%S).backup"
pg_dump -U user1 --format custom --verbose --file $FILENAME DB_NAME
unset PGPASSWORD