Last active
February 27, 2019 15:23
-
-
Save Raul-mz/c25ba589371acde1619ee568e9ba14fb to your computer and use it in GitHub Desktop.
Automated Backup on Linux (Postgresql)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment