Skip to content

Instantly share code, notes, and snippets.

@teohm
Created December 2, 2013 02:40
Show Gist options
  • Save teohm/7744130 to your computer and use it in GitHub Desktop.
Save teohm/7744130 to your computer and use it in GitHub Desktop.
#!/bin/bash
_now=$(date +"%Y-%m-%d-%H%M%S")
_file="/u/backups/foo/pg-$_now.dump"
sudo -u postgres pg_dump -Fc foo_production > "$_file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment