pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
Cc: Grega Bremec <gregab@p0f.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: FW: Setting up of PITR system.
Date: Sun, 2 Apr 2006 13:31:51 -0400
Message-ID: <20060402173150.GA13517@surnet.cl> (raw)
In-Reply-To: <a97c77030604020914n38b3e3bco2138b9673f25b176@mail.gmail.com>
References: <!&!AAAAAAAAAAAuAAAAAAAAALfqleqaijxJlxu+E5RYF+YBAJaQ0jfg6zBFp7poaER6UCkAAAGy3PcAABAAAAB0heSWPqq+QLrrk5Lik5sLAQAAAAA=@mailnetwork.co.uk>
	<a97c77030603290445o29f96099xd3cc5f15cd4fb364@mail.gmail.com>
	<442B93DD.4020305@p0f.net>
	<a97c77030603312023k7bdc705eif22af429dc3c943d@mail.gmail.com>
	<442E1945.4030006@p0f.net>
	<a97c77030604010258j657622fcj6a42a10c8c38f344@mail.gmail.com>
	<442FDC7F.9010001@p0f.net>
	<a97c77030604020914n38b3e3bco2138b9673f25b176@mail.gmail.com>

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.



view thread (36+ messages)  latest in thread

Message-ID: <20060402173150.GA13517@surnet.cl>
Permalink:  ../20060402173150.GA13517@surnet.cl/
Also on:    postgresql.org/message-id/20060402173150.GA13517@surnet.cl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: alvherre@commandprompt.com, mallah.rajesh@gmail.com, gregab@p0f.net
  Subject: Re: FW: Setting up of PITR system.
  In-Reply-To: <20060402173150.GA13517@surnet.cl>
  References: <!&!AAAAAAAAAAAuAAAAAAAAALfqleqaijxJlxu+E5RYF+YBAJaQ0jfg6zBFp7poaER6UCkAAAGy3PcAABAAAAB0heSWPqq+QLrrk5Lik5sLAQAAAAA=@mailnetwork.co.uk> <a97c77030603290445o29f96099xd3cc5f15cd4fb364@mail.gmail.com> <442B93DD.4020305@p0f.net> <a97c77030603312023k7bdc705eif22af429dc3c943d@mail.gmail.com> <442E1945.4030006@p0f.net> <a97c77030604010258j657622fcj6a42a10c8c38f344@mail.gmail.com> <442FDC7F.9010001@p0f.net> <a97c77030604020914n38b3e3bco2138b9673f25b176@mail.gmail.com> <20060402173150.GA13517@surnet.cl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox