Search Postgresql Archives

pg_dump/psql: Select a server and automate password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings!
 
On my computer, I have a copy of a customer's database for which a full backup file would be about 300 megabytes long.  There are several history tables that are not needed for day-to-day operation of our system.  I came up with a DOS batch file that consists of a sequence of pg_dump commands.  The first dumps the database's schema, and all the rest dump the required tables into individual files.  A companion batch file issues psql repeatedly to recreate the database and the tables. 
 
On my computer, the batch files work fine.  I run them and they happily call pg_dump or psql as many times as they need to, and I don't need to do anything. 
 
I just uploaded the batch files to our customer's machine, and a couple of questions occured to me.  First, pg_dump asks me for a password every time it is invoked.  That doesn't happen on my computer.  What is likely to be set up differently on my computer so that I don't need a password?
 
Second, I see no way to select a server in pg_dump or psql.  I am connected to a computer that was set up for my use specifically for testing.  In PGAdmin on that machine, I have a server talking to localhost and a server talking to the machine that hosts the production database.  I would like to run my batch file on the testing machine, but how do I tell pg_dump to use the server that talks to the production machine?
 
Thank you very much!
 
RobR


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux