Re: Emergency backup question.

From: Brian <Brrrian(at)Excite(dot)com>
To: Danni Coy <rgcoy(at)midcoast(dot)com(dot)au>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Emergency backup question.
Date: 2001-11-20 17:42:45
Message-ID: 3.0.5.32.20011120094245.00c2d3d0@pop.we.mediaone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

My take on the documentation that I just read is that you have a filesystem backup of the data if you have everything at and below the pgsql/data directory...

---- to quote the docs --------

An alternative backup strategy is to directly copy the files that Postgres uses to store the data in the database. In Section 3.2 it is explained where these files are located, but you have probably found them already if you are interested in this method. You can use whatever method you prefer for doing usual file system backups, for example

tar -cf backup.tar /usr/local/pgsql/data

There are two restrictions, however, which make this method impractical, or at least inferior to the pg_dump method:

The database server must be shut down in order to get a usable backup. Half-way measures such as disallowing all connections will not work as there is always some buffering going on. For this reason it is also not advisable to trust file systems that claim to support "consistent snapshots". Information about stopping the server can be found in Section 3.6.

Needless to say that you also need to shut down the server before restoring the data.

-- end quote --------

At 05:15 AM 11/23/01 +1100, Danni Coy wrote:
>Greetings Basically I have a problem here. I lost my linux system due to
>hard drive corruption I managed to back up my /var/lib/pgsql/data/base
>directory to an ordinary tarball before I redid the system. Is there any
>way to use this data as a backup?
>and what is the proceedure for a proper backup?
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-11-20 17:44:58 Re: 7.1.3 compilation failure (libpq or aync?)
Previous Message James Olsen 2001-11-20 17:01:42 Re: 7.1.3 compilation failure (libpq or aync?)