Skip to content

Instantly share code, notes, and snippets.

@mickm
Created December 6, 2013 21:31
Show Gist options
  • Save mickm/7832447 to your computer and use it in GitHub Desktop.
Save mickm/7832447 to your computer and use it in GitHub Desktop.
dump tables, sequences, indices, constraints and data (no languages, functions, types, etc.)
pg_dump --no-owner --no-privileges $(paste -sd\ <(echo '\dt' |psql -At |awk -F\| '{print $2}' |egrep -v '^(spatial_ref_sys|geometry_columns)$' |xargs -n 1 echo -t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment