Re: FW: Setting up of PITR system. - Mailing list pgsql-admin

From Alvaro Herrera
Subject Re: FW: Setting up of PITR system.
Date
Msg-id 20060402173150.GA13517@surnet.cl
Whole thread Raw
In response to Re: FW: Setting up of PITR system.  ("Rajesh Kumar Mallah" <mallah.rajesh@gmail.com>)
List pgsql-admin
Rajesh Kumar Mallah wrote:

> Another area i was thinking to improve this script was to
> make it dig out all the tablespace folders to be archived by looking
> into PGDATADIR/pg_tblspc . This shall make the script more generic.
>
> pg_tblspc as contents like below:
>
>  $ ls -l
> total 0
> lrwxrwxrwx 1 postgres postgres 19 Mar 27 21:45 16391 -> /mnt/indexspace_new
> lrwxrwxrwx 1 postgres postgres 18 Mar 27 21:45 16392 -> /mnt/bigtables_new
>
> can you suggest the sane/recommended way to get the destination
> folders?( i was thinking find $PGDATADIR/pg_tblspc -type l -printf "%???????" )
> or do i parse output of ls !

Try the readlink utility (part of GNU coreutils, not sure about other
Unixen).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Show tables query
Next
From: "Marc G. Fournier"
Date:
Subject: semctl(): Invalid argument