Last active
December 12, 2015 06:59
-
-
Save justinlewis/4733313 to your computer and use it in GitHub Desktop.
Linux terminal command to backup a PostgreSQL database. Can be executed with a cron job.
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
PGPASSWORD=your_password pg_dump -i -h your_host -p 5432 -U your_user -F c -b -v -Tc -f /path/to/your/backup.backup your_db_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment