Re: Backing Up a Postgres database... - Mailing list pgsql-novice

From Ron Johnson
Subject Re: Backing Up a Postgres database...
Date
Msg-id 1064513616.2991.123.camel@haggis
Whole thread Raw
In response to Backing Up a Postgres database...  (Jonathan Telep <jon2@autoweb.net>)
List pgsql-novice
On Wed, 2003-09-24 at 13:51, Jonathan Telep wrote:
> Hello, I'm not sure who I should be posing this question to but I'm a
> System Administrator who has inherited several Debian Linux servers one
> of which apparently hosts a rather large Postgres database.  One of my
> responsibilites is to back that database up each night and be able to
> recover it "on the fly" in the event of a problem.  I have no idea how
> to even check which version of Postgres is loaded on this server, let
> alone, be able to back it up.
>
> Is there anyone who can give me just some basic commands on how to shut
> it down each night, back it up, verify that the back up is good and what
> to do in the event that I ever have to restore it?  I know it seems like
> a lot but I'm swamped with a million things to do and would rather not
> have to read a couple hundred pages of material if I can avoid it.

If Postgresql was installed via apt, then you can start/stop it
using /etc/init.d/postgresql.

Backup with pg_dump, and restore with pg_restore.
http://www.postgresql.org/docs/7.3/static/index.html
http://www.postgresql.org/docs/7.3/static/reference-client.html
http://www.postgresql.org/docs/7.3/static/app-pgdump.html
http://www.postgresql.org/docs/7.3/static/app-pg-dumpall.html
http://www.postgresql.org/docs/7.3/static/app-pgrestore.html

--
-----------------------------------------------------------------
Ron Johnson, Jr. ron.l.johnson@cox.net
Jefferson, LA USA

"As the night fall does not come at once, neither does
oppression. It is in such twilight that we must all be aware of
change in the air - however slight - lest we become unwitting
victims of the darkness."
Justice William O. Douglas


pgsql-novice by date:

Previous
From: Juan Francisco Diaz
Date:
Subject: Re: Function return type does not match
Next
From: Tom Lane
Date:
Subject: Re: Calling a function within a function - plpsql