Is there any way to dump a postgres db using psql only ( without pg_dump )? Thanks.
Dumping a DB without pg_dump
Asked Answered
Theoretically you have access to all the data needed. In practice you're more likely to be able to dump/save some data using COPY
command, but not the database schema, etc.
Note, that you do not have to have pg_dump
on the same machine where your database server is, if it listens to the network. But well, I don't know why you even ask :)
well, it was mostly curiosity. –
Gingery
In theory you could run queries to extract the schema and then use those results to extract the data. But it wouldn't be easy to manipulate all of that into something usable for a restore using just psql.
© 2022 - 2024 — McMap. All rights reserved.
pg_dump
you may run into a Pg server version mismatch – Chelseachelsey