X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 572D611F6B0E for ; Sun, 2 Apr 2006 14:31:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06688-02 for ; Sun, 2 Apr 2006 14:31:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.surnet.cl (mx1.surnet.cl [216.155.73.180]) by postgresql.org (Postfix) with ESMTP id 797C211F6F0E for ; Sun, 2 Apr 2006 14:31:52 -0300 (ADT) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 02 Apr 2006 13:31:52 -0400 X-IronPort-AV: i="4.03,155,1141614000"; d="scan'208"; a="50583938:sNHT19000904" Received: from alvh.no-ip.org (201.220.123.23) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 43A978FD00D0FEE0; Sun, 2 Apr 2006 13:31:51 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 46A10C37116; Sun, 2 Apr 2006 13:31:51 -0400 (CLT) Date: Sun, 2 Apr 2006 13:31:51 -0400 From: Alvaro Herrera To: Rajesh Kumar Mallah Cc: Grega Bremec , pgsql-admin@postgresql.org Subject: Re: FW: Setting up of PITR system. Message-ID: <20060402173150.GA13517@surnet.cl> Mail-Followup-To: Rajesh Kumar Mallah , Grega Bremec , pgsql-admin@postgresql.org References: <442B93DD.4020305@p0f.net> <442E1945.4030006@p0f.net> <442FDC7F.9010001@p0f.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060126 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.738 required=5 tests=[AWL=0.738] X-Spam-Score: 0.738 X-Spam-Level: X-Archive-Number: 200604/19 X-Sequence-Number: 21188 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.