I have a fairly huge DB and pg_dump croaks on me when I try to export it to a single file. Is there a way to do it in batches, whereby each batch would cover a segment of tables and export the schema/data in its own file rather than all in one file?

  • You mean, something like the --table option? – CL. Nov 29 '18 at 8:34
  • Not really, I would prefer if the utility itself determined how to break down the export rather than myself having to specify tables. I don't want to do that because there are RI dependencies – amphibient Nov 29 '18 at 15:09
  • It would be possible to pipe the dump output into split, but then you would not have independent files. – CL. Nov 29 '18 at 15:33
  • You could export one schema at a time using -n, but that would lose dependencies across schemas. And very easily could "croak" anyway at the individual schema. Problems are usually best addressed head on. Why is it croaking? – jjanes Nov 29 '18 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.