Re: backup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "dubois" <dubois(at)bol(dot)com(dot)br>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: backup
Date: 2001-01-08 15:38:13
Message-ID: 17744.978968293@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"dubois"<dubois(at)bol(dot)com(dot)br> writes:
> I want to make a backup copy of a
> database...
> What I have to do?

pg_dumpall is the recommended answer.

> Do I have just to copy the directory
> at
> /var/lib/pgsql/base ?

This is NOT sufficient.

Copying the entire $PGDATA directory (not only the base/ subdirectory)
is sufficient, if and only if the database is completely idle while you
do it --- I'd recommend stopping the postmaster to be sure. Otherwise
you will get inconsistent files. In particular, you WILL have problems
if $PGDATA/pg_log is out of sync with any table data file.

regards, tom lane

In response to

  • backup at 2001-01-08 11:40:36 from dubois

Responses

  • Re: backup at 2001-01-08 23:12:40 from Anthony E . Greene

Browse pgsql-novice by date

  From Date Subject
Next Message Robert B. Easter 2001-01-08 17:05:54 Re: Re: I think I know what I'm doing wrong, but....
Previous Message dubois 2001-01-08 11:40:36 backup