Skip to content

Instantly share code, notes, and snippets.

@khacanh
Created March 17, 2014 03:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khacanh/9593627 to your computer and use it in GitHub Desktop.
Save khacanh/9593627 to your computer and use it in GitHub Desktop.
pg_restore --host localhost --port 5432 --username "postgres" --dbname "my_dev" --no-password --verbose "server.dump"
@gholadr
Copy link

gholadr commented Mar 22, 2014

exporting sql gzipped data as JSON with delimiter ','
COPY (select row_to_json(application_trackers) from application_trackers) TO PROGRAM 'gzip > ~/my_data.zip' DELIMITER ',';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment