Skip to content

Instantly share code, notes, and snippets.

@TimKraemer
Created June 20, 2016 13:21
Show Gist options
  • Save TimKraemer/fbfe3615bbf1160eab209d1780e2a9d8 to your computer and use it in GitHub Desktop.
Save TimKraemer/fbfe3615bbf1160eab209d1780e2a9d8 to your computer and use it in GitHub Desktop.
daily postgres dump called by crontab
#!/bin/bash
su postgres -c 'pg_dump db --clean' | gzip --rsyncable --best > /data/export/KM/backup/kmdb/"$(date +"%Y-%m-%d")".gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment