8

Is there a python library that contains the functionality of the pg_dump, pg_dumpall and restore commands? I want to have the ability to handle exceptions where the standard commands do not allow for that level of control.

Is there anything out here that can help me?

1 Answer 1

1

You could try psycopg2. It's a python api to postgres, and you can use the copy_from and copy_to methods on the cursor to do it with StringIO objects and do it all in memory, or just with the disk.

This is only good for data though, i believe.

Sign up to request clarification or add additional context in comments.

1 Comment

Unfortunately, that won't solve the problem, unless you're willing to go through the trouble of implementing your very own backup/restore routines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.