pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aaron Spiteri <aaron@m1group.com.au>
To: pgsql-admin@postgresql.org
Subject: Re: pg_dump question
Date: Tue, 29 Oct 2002 12:38:28 +1100
Message-ID: <02102912382808.12232@scooby.m1group.com.au> (raw)
In-Reply-To: <39968.66.47.66.34.1035854809.squirrel@tomandshirl.com>
References: <39968.66.47.66.34.1035854809.squirrel@tomandshirl.com>

One way is to do this is by configuring the remote server to trust the host 
that is going to be doing the back up.  This can be done in the pg_hba.conf
file which is located in "/var/lib/pgsql/data" on my server.

If the Server that is going to be doing the back up has the IP address of say
192.168.0.2 and then on the database server you can add the following lines

host 	all	192.168.0.2	255.255.255.255		trust
host	all	0.0.0.0	255.255.255.255	password

This will allow the server 192.168.0.2 to access any database it likes 
remotly without needing a password.  Usename must be valid however.

This can also specify what database the host can access by changing the
key word "all" to the database name.
host 	template1	192.168.0.2	255.255.255.255		trust

There are possibly much more secure wats to do this and if you here of any 
let me know.

Aaron

On Tue, 29 Oct 2002 12:26, you wrote:
> Hi Folks,
>
> Fairly basic question here, I think. I've looked through the archives, but
> can't seem to find anything.
>
> I need to set up a daily cron job that performs a pg_dump on a remote
> database. I can't figure out how to pass a password to it. How do I do
> this. Everything I've tried still comes up with asking me for a password
> when I test it.
>
> Thanks, Tom
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



view thread (10+ messages)  latest in thread

Message-ID: <02102912382808.12232@scooby.m1group.com.au>
Permalink:  ../02102912382808.12232@scooby.m1group.com.au/
Also on:    postgresql.org/message-id/02102912382808.12232@scooby.m1group.com.au

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: aaron@m1group.com.au
  Subject: Re: pg_dump question
  In-Reply-To: <02102912382808.12232@scooby.m1group.com.au>

* 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