Thread: remote dumping of databases

remote dumping of databases

From
Frank Nijenhuis
Date:
hi,
got a question, i tried to find my answer in the documentation and mailing
list archives, till now with no luck.
I've got multiple virtuale webservers with customers using a remote pgsql
server where they don't have access to.
All access is done with clients and scripting languages from the
webserver.
Now I want them to be able to dump their own database. And when I use the
command without piping the result to a file everything works.
(pg_dump -h <remote pgsqlserver) -u <dbname>.
You get the user prompt and password prompt..How ever..how do you get the
content of the dump to a file??? Every pipe action will result in endless
waiting, pg_dumps waits for the username/password.......

Is there an solution of do I overlook something here???


bye

Frank



Re: remote dumping of databases

From
dev@archonet.com
Date:
On 3/6/01, 8:55:05 AM, Frank Nijenhuis <fnijen@bos.nl> wrote regarding
[GENERAL] remote dumping of databases:

[snip]
> Now I want them to be able to dump their own database. And when I use the
> command without piping the result to a file everything works.
> (pg_dump -h <remote pgsqlserver) -u <dbname>.
> You get the user prompt and password prompt..How ever..how do you get the
> content of the dump to a file??? Every pipe action will result in endless
> waiting, pg_dumps waits for the username/password.......

> Is there an solution of do I overlook something here???

You could look at wrapping pg_dump in something like "expect" or "chat"
which are designed to deal with interactive programs. You might find
useful examples relating to changing passwords since passwd has a similar
problem.

- Richard Huxton

Re: remote dumping of databases

From
"Brent R. Matzelle"
Date:
>How ever..how do
> you get the
> content of the dump to a file??? Every pipe action will result
> in endless
> waiting, pg_dumps waits for the username/password.......
>
> Is there an solution of do I overlook something here???

Give the user who is performing the dump read access on all
tables, indices, etc on the database(s) you wish to dump.  Then
you can run a pg_dump without the password prompt coming up.

% pg_dump database_name > file.dump

Brent


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/