| From: | John R Pierce <pierce(at)hogranch(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Backing up through a database connection (not pg_dump) |
| Date: | 2012-03-26 23:16:27 |
| Message-ID: | 4F70F8CB.70505@hogranch.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Boreham | 2012-03-27 00:00:45 | Re: Backing up through a database connection (not pg_dump) |
| Previous Message | Tim Uckun | 2012-03-26 23:05:00 | Backing up through a database connection (not pg_dump) |