Last active
September 5, 2015 17:40
-
-
Save typomedia/a53adf940f4e0ec37619 to your computer and use it in GitHub Desktop.
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/sh | |
# Copyright 2015 Typomedia Foundation. All rights reserved. | |
# Use is subject to license terms. | |
# | |
# Postgres Dump Script v1.0 | |
DBHOST=127.0.0.1 | |
DBUSER=dbmaster | |
PASSWORD=****** | |
DATE=`date '+%Y%m%d'` | |
PGPASSWORD=$PASSWORD pg_dump --host=$DBHOST --username=$DBUSER \ | |
your-db-name > /var/backups/pgsql/${DATE}_your-db-name.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment