Backup postgresql database from python

Philip Semanchuk philip at semanchuk.com
Sat Dec 4 14:52:37 EST 2010


On Dec 4, 2010, at 2:32 PM, D'Arcy J.M. Cain wrote:

> On Sat, 4 Dec 2010 19:12:08 +0000
> starglider develop <starglider.dev at gmail.com> wrote:
>> I need to backup a postgresql database from python withour using pg_dump!
>> Is any way of doing that?
> 
> Probably.  I guess the first question is why can't you use pg_dump?
> That might give us a clue as to the requirements.  

Excellent point. No offense to the OP, but this isn't really a Python question. You could re-implement pg_dump in Python, Javascript, or any language you like and you'd have your solution. That's probably not what you were looking for though. As D'Arcy said, the first thing to establish is why you want to avoid pg_dump. Another important question is whether or not you expect the database to be in use while you're doing backups.

bye
Philip


More information about the Python-list mailing list