Last active
December 14, 2015 21:58
-
-
Save momer/5154492 to your computer and use it in GitHub Desktop.
Automagically backup & upload postgres database to a remote server at 5:45am every day.
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
# m h dom mon dow user command | |
45 5 * * * postgres pg_dumpall -l YOURDBNAME | gzip -c | ssh backup@MYBACKUPSERVER "cat | gzip /YOURDIRECTORYPATH/pg_backups/$(date +\"%Y-%m-%d:%T\")YOURFILENAME.gz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment