Thread: Recovery in PostgreSql

Recovery in PostgreSql

From
"Sumita Chatterjee"
Date:
I have two questions:

1. In Postgresql, what is the name of the exact DATAFILE under the DATA
DIRECTORY ?

2. We want to prepare a backup machine (for disaster management) by
passing only the ARCHIVEDIR directory from another online machine - both
the machines have Postgresql installed. We have sent PGLOG and ARCHIVEDIR
but the recovery is not successful unless we send the FULL DATA Directory.

Please help us in resolving this problem whereby we do not have to send
the full DATA Directory.

The version of Postgresql is 8.0.3 on SuSe Linux 9.

Thanks and Regards

Sumita Chatterjee








Re: Recovery in PostgreSql

From
Chris
Date:
Sumita Chatterjee wrote:
> I have two questions:
>
> 1. In Postgresql, what is the name of the exact DATAFILE under the DATA
> DIRECTORY ?

It depends. The subfolders under data are the OID of the database - they
are not stored per name.

> 2. We want to prepare a backup machine (for disaster management) by
> passing only the ARCHIVEDIR directory from another online machine - both
> the machines have Postgresql installed. We have sent PGLOG and ARCHIVEDIR
> but the recovery is not successful unless we send the FULL DATA Directory.

You're out of luck.

Even this method is dangerous - differences in platforms, software
versions will cause issues.

Why not use pg_dumpall or pg_dump ?

--
Postgresql & php tutorials
http://www.designmagick.com/

Re: Recovery in PostgreSql

From
Simon Riggs
Date:
On Mon, 2006-03-27 at 14:55 +0530, Sumita Chatterjee wrote:
> I have two questions:
>
> 1. In Postgresql, what is the name of the exact DATAFILE under the DATA
> DIRECTORY ?
>
> 2. We want to prepare a backup machine (for disaster management) by
> passing only the ARCHIVEDIR directory from another online machine - both
> the machines have Postgresql installed. We have sent PGLOG and ARCHIVEDIR
> but the recovery is not successful unless we send the FULL DATA Directory.
>
> Please help us in resolving this problem whereby we do not have to send
> the full DATA Directory.

You need to *start* from a full base backup of the data directory. So
you need to transfer *all* of the data at least once.

Recovery can then proceed using just the transfer of the xlog files.

Think of that the base backup brings the data and the xlog files bring
the current state of that data.

Best Regards, Simon Riggs