pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Murthy Kambhampaty <Murthy.Kambhampaty@goeci.com>
To: 'darren@zonarsystems.com' <darren@zonarsystems.com>
To: pgsql-admin@postgresql.org
Subject: Re: Automated database backups and authentication
Date: Tue, 6 Aug 2002 18:17:27 -0400
Message-ID: <E631530D51ABD411B823009027855C5B027995@THOR> (raw)
If you have a few users and many databases, and the user that created the
database will be the one to access it, it might work for you to do a query
on pg_database to get a list of databases and their creators, then do a
pg_dump of each database while passing the password (echo <password>
redirection or expect script) for each database depending on the user. (I
something similar in MySQL, though not the password pasing, and it looks
like it can be done in pSQL also).
Alternatively, it seems you might run pg_dumpall as the superuser and after
dumping all the databases, chown the dump files?
Murthy
"Out of the mouths of babes ..."
>-----Original Message-----
>From: Darren McClelland [mailto:darren@zonarsystems.com]
>Sent: Tuesday, August 06, 2002 14:15
>To: pgsql-admin@postgresql.org
>Subject: [ADMIN] Automated database backups and authentication
>
>
>Hello,
>
>I would like to backup a set of databases from a cron job. It
>looks like
>pg_dumpall will do the trick. The only problem is that there
>doesn't seem to
>be any way to pass the database password to pg_dumpall in a
>non interactive
>manner. I'd like to use some kind of access control on the
>databases, but it
>would need to be able to function non interactively.
>
>Ideally whatever I do would be able to function across a
>network, so that one
>database server could backup to a second - kind of a poor
>man's replication.
>
>I haven't found any real answers in any of the archives, or
>docs. Has anyone
>here done something like this or have any thoughts?
>
>Thanks,
>Darren McClelland
>
>
>---------------------------(end of
>broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>
view thread (12+ messages) latest in thread
Message-ID: <E631530D51ABD411B823009027855C5B027995@THOR> Permalink: ../E631530D51ABD411B823009027855C5B027995@THOR/ Also on: postgresql.org/message-id/E631530D51ABD411B823009027855C5B027995@THOR ·
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: Murthy.Kambhampaty@goeci.com, darren@zonarsystems.com Subject: Re: Automated database backups and authentication In-Reply-To: <E631530D51ABD411B823009027855C5B027995@THOR> References: <E631530D51ABD411B823009027855C5B027995@THOR> * 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