first question here, fairly new to DB's and Data itself.
My question is fairly simple, after playing around with Postgres, PGAdmin3, I realised I would like to access some public data, but I struggled to find any publicly available .tar files to practice with. Leading me to wonder what file formats you can restore from.
What file formats can I restore from using pg_restore? And is there a preference in the community towards certain formats?
Thanks for your time. Look forward to participating on the forum.
PS: If it wasn't clear, I am restoring from command line.
Best Answer
Exactly one file format is supported by
pg_restore
: the custom PostgreSQL dump formats frompg_dump -F c
(custom),-F d
(directory) and-F t
(tar). Notably it cannot restore-F s
(SQL) format dumps, which must be passed topsql -f
instead.If you want to load data, you probably want the
\copy
command frompsql
or the server-backendCOPY
command. It can load a variety of CSV-like data.There are also external loader and ETL tools that can do more, e.g.
pgloader
, Talend Studio, Pentaho Kettle, CloverETL, etc.