Created
September 8, 2014 08:26
-
-
Save maracuja/d419b3f3156674c40c4d to your computer and use it in GitHub Desktop.
timestamped db backup command for postgres in crontab
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
0 5,13 * * * pg_dump dbname_dev --no-owner > /var/lib/postgresql/backups/dev-`date +\%Y-\%m-\%d_\%T`.sql | |
0 5,13 * * * pg_dump dbname_uat --no-owner > /var/lib/postgresql/backups/uat-`date +\%Y-\%m-\%d_\%T`.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment