backup/restore postgresql database

kyosohma at gmail.com kyosohma at gmail.com
Thu Aug 2 10:24:45 EDT 2007


On Aug 2, 1:55 am, Acm <alextab... at gmail.com> wrote:
> I am working with Python 2.5 and Postgresql 8.2.4.
>
> I would like to know how to perform the backup and restore operations
> on postgresql through a python API (e.g. psycopg2).
>
> Thank you.


I don't know much about postgres, but here's what my google-fu turned
up:

http://www.koders.com/python/fidF98B0B88C167C4B9862D8EF6C0CC9BAAC33718DB.aspx?s=cdef%3Aparser
http://python.projects.postgresql.org/
http://pypgsql.sourceforge.net/
http://www.pygresql.org/

You can probably use the subprocess module to connect to it and use
the pg_dump command as well that is documented here:
http://www.postgresql.org/docs/8.1/static/backup.html

Mike




More information about the Python-list mailing list