X-Original-To: pgsql-admin@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 4A8B5925830 for ; Mon, 26 May 2003 05:56:14 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 43405-01 for ; Mon, 26 May 2003 05:56:13 -0400 (EDT) Received: from shield.nordlb.lv (shield.pirmabanka.lv [195.114.57.4]) by developer.postgresql.org (Postfix) with ESMTP id D2B90925821 for ; Mon, 26 May 2003 05:56:12 -0400 (EDT) Received: from wall2.pirmabanka.lv (wall2-pub.nordlb.lv [195.114.57.14]) by shield.nordlb.lv (8.12.9/8.12.9) with SMTP id h4Q9uBGZ015473 for ; Mon, 26 May 2003 12:56:11 +0300 Received: from share.nordlb.lv ([10.0.0.10]) by wall2.pirmabanka.lv; Mon, 26 May 2003 12:56:10 +0300 (EET DST) Received: from pc311x1.nordlb.lv (localhost.localdomain [127.0.0.1]) by nordlb.lv (8.11.6/8.11.6) with SMTP id h4Q9u9703834 for ; Mon, 26 May 2003 12:56:10 +0300 Received: (qmail 20233 invoked by uid 100); 26 May 2003 09:59:03 -0000 Date: Mon, 26 May 2003 12:59:03 +0300 From: "Victor Yegorov" To: "Nathalie Boulos" Cc: pgsql-admin@postgresql.org Subject: Re: Backup passwd protected DB Message-ID: <20030526095903.GB18253@nordlb.lv> Mail-Followup-To: "Nathalie Boulos" , pgsql-admin@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/359 X-Sequence-Number: 8921 * Nathalie Boulos [26.05.2003 12:49]: > Hello, > > I need to backup a postgresql-7.3.2 DB with a user having a password using > cron. > > every time i call pg_dump I get prompted for a password. It's OK if i'm > running it from command line. But when i use cron, the backup couldn't be > executed because no password is given. > > I don't want to put the password in clear text in any file for security > reasons, and i don't want to grant read access to a "backup" user with no > password. > > is there any solution to dump that database? In my case, I've created a separate user, without OS password, stored DB password in ~/.pgpass with proper permissions. Now, to access OS user, I need to enter root console and make `su'. You can also write a little script, that would do sily `encoding' of your password, say - XOR it with some value. It'll be harder to see real password. -- Victor Yegorov