Thread: Backup from within Postgres

Backup from within Postgres

From
Online -- Goa
Date:
Dear friends,
I have been searching the mailing lists for a couple of days now hoping to
find a solution to my problem. Well I hope I find a solution here. 

The problem is such:    I have a Win32 application that uses ODBC to connect to the Postgres (ver
6.5) on RedHat Linux dbase. I have been able to connect and perform a lot
of SQL statements, etc. However I am unable to perform the backup of the
dbase. I need to backup up the database from within this application. It
doesn't matter where the backup file is. I know there is a shell command
"pg_dump", yes it works fine from the shell but I need to backup the dbase
when connected to the Postgers database on an ODBC connection (I'm using
the 32-bit ODBC drivers for postgres).I have also tried making a function in the dbase and including the
"pg_dump" in that but to no avail. 

I would be grateful if there were any suggestions/advice/code to help me
with this task.

thanx a lot guys,
lloyd




Re: Backup from within Postgres

From
Peter Eisentraut
Date:
Online -- Goa writes:

>         I have a Win32 application that uses ODBC to connect to the Postgres (ver
> 6.5) on RedHat Linux dbase. I have been able to connect and perform a lot
> of SQL statements, etc. However I am unable to perform the backup of the
> dbase. I need to backup up the database from within this application.

Then you need to ask the author of that application to add this
functionality.  If this is your own application, then you will have to
duplicate a lot of pg_dump's code in it, which will probably be a rather
large project.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/