On 03/24/2010 02:36 PM, Alan Bourke wrote:
>
> Thanks for all the info Leland. Of course my PGAdmin3 is also hosed
> because of some issue with WXWidgets and there doesn't appear to be any
> movement from either WXWidgets or PGAdmin on fixing it. Sigh. I'll have
> to learn to drive PostgreSQL from the prompt I suppose!
>    

One other thought.  I use Webmin's PostgreSQL Server Section to create a 
nightly backup of my databases.  Webmin makes it easy to fill out a GUI 
backup form, and when completed the webmin perl script creates a crontab 
job that run based on the schedule you select within the form.

I haven't tried it, but it might be possible to install a major upgrade 
of PostgreSQL, and then use the webmin interface to restore all your 
data, but I would need to test this or go into the webmin perl script to 
be sure.

If I were you, I would set up my .bash_profile so all the postgres 
variable would be read into the enviroment memory space when you log in 
as postgres or "su -l" to postgres.

For example from user leland I could do this:

#-----------------------------

[lel...@leland ~]$ su -l postgres
Password:
-bash-4.0$ pwd
/var/lib/pgsql
-bash-4.0$ whoami
postgres
-bash-4.0$ psql template1
Welcome to psql 8.3.9, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
        \h for help with SQL commands
        \? for help with psql commands
        \g or terminate with semicolon to execute query
        \q to quit

template1=#

#---------------------------------

Notice in the above conversation I had to enter my Fedora 11 postgres 
user password to su into
the Fedora 11 postgres user.  At this point all the PostgreSQL 
enviroment variable have been read into memory from the postgres home 
directory .bash_profile file.  Next I was able to shell into psql 
without either specifying user postgres, or entering the postgres 
superuser password; because, it's already available from the PGPASSWORD 
enviroment variable.

If you had two major versions of postgreSQL above version 7, that were 
operational and running on separate ports, you should be able to load 
all databases, roles, user, permissions, (eg everything),  with this 
simple one liner:

pg_dumpall -p 5432 | psql -d postgres -p 6543

You would need to substitute your port number in the above.

You may need to configure permissions to make sure the Ubuntu postgres 
user has all the rights need to perform the migration.  Permission must 
also be set in using Webmin to create schedule backups.  I usually 
insure the OS postgres user own all relevant files giving the OS 
postgres user read, write, and execute permission.  Then whenever 
working in PostgreSQL, (eg configuring pg_hba.conf or postgresql.conf), 
I log into the OS as posgres user.

Regards,

LelandJ



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to