Redshift Notes

From Federal Burro of Information
Revision as of 20:00, 22 November 2018 by David (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

get all schemas:

echo "select nspname from pg_namespace where nspowner = 100;" | psql -t -A > list_of_user_schemas.txt

dump each schema

for i in `cat list_of_user_schemas.txt`; do echo $i; pg_dump -s -n $i > $i.schema; done