Last active
May 20, 2018 23:57
-
-
Save mbenedettini/9e2888353a5b06946a48c793fda0aa7e to your computer and use it in GitHub Desktop.
Postgresql docker backup custom format
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
# Backups database $DATABASE running in container $CONTAINER | |
docker exec -u postgres $(docker ps | grep $CONTAINER | cut -f 1 -d " ") pg_dump -Fc $DATABASE > "$OUTPUTDIR/$DATABASE-$(date "+%u").pg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment