Re: Backing up through a database connection (not pg_dump) - Mailing list pgsql-general

From John R Pierce
Subject Re: Backing up through a database connection (not pg_dump)
Date
Msg-id 4F70F8CB.70505@hogranch.com
Whole thread Raw
In response to Backing up through a database connection (not pg_dump)  (Tim Uckun <timuckun@gmail.com>)
Responses Re: Backing up through a database connection (not pg_dump)
Re: Backing up through a database connection (not pg_dump)
List pgsql-general
On 03/26/12 4:05 PM, Tim Uckun wrote:
> Is there a way to backup a database or a cluster though a database
> connection?  I mean I want to write some code that connects to the
> database remotely and then issues a backup command like it would issue
> any other SQL command. I realize the backups would need to reside on
> the database server.

there is no backup command in postgres SQL,   you could enumerate the
tables, and use /COPY tablename TO filepath;/ on each table, these files
would have to be in a directory writable by the postgres server process.

alternately, you could open a shell session on the dbserver and run
pg_dump there.    frankly, this would be preferable.





--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


pgsql-general by date:

Previous
From: Tim Uckun
Date:
Subject: Backing up through a database connection (not pg_dump)
Next
From: David Boreham
Date:
Subject: Re: Backing up through a database connection (not pg_dump)