Re: [ADMIN] Moving the data directory

2011-02-16 Thread Dean Gibson (DB Administrator)
On 2011-02-16 04:51, Greg Smith wrote: Debian and Ubuntu installations have a unique feature where you can have multiple PostgreSQL installations installed at the same time. That's pretty easy to do with any Linux distribution. -- Mail to my list address MUST be sent via the mailing list. A

Re: [ADMIN] Moving the data directory

2011-02-16 Thread Greg Smith
Sairam Krishnamurthy wrote: I am using Ubuntu 10.04 and Postgres 8.4, I have been trying to move my data dir to another device for the past couple of days but ran into a lot of problems. I did the following: 1. Copy the contents of /var/lib/postgresql/8.4/main to my folder. 2. Changed the data_

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Thomas Kellerer
Sairam Krishnamurthy, 15.02.2011 23:43: Again, pg_ctl: could not open PID file "/media/extension/var/lib/postgresql/8.4/main/postmaster.pid": Permission denied Tried all the different ownership possible. And you are sure you ran that as the postgres user? Thomas -- Sent via pgsql-admin ma

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Sairam Krishnamurthy
I followed the preferred way to migrate the data and ran into this problem. So i guess I am stuck here and cant get any help from the docs. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 02/15/2011 04:59 PM, Frederiko Costa wrote: You might find something in the documentation about migrating

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Frederiko Costa
You might find something in the documentation about migrating the data directory to another server. ~Fred Linkedin profile: http://www.linkedin.com/in/frederikocosta On Tue, Feb 15, 2011 at 2:58 PM, Sairam Krishnamurthy wrote: > Frederiko, > > I will try that. I was hoping to have a better sol

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Sairam Krishnamurthy
Frederiko, I will try that. I was hoping to have a better solution than to reinstall postgres. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 02/15/2011 04:56 PM, Frederiko Costa wrote: What I meant was that when you install postgresql, you initialize the area where your data directory wil

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Frederiko Costa
What I meant was that when you install postgresql, you initialize the area where your data directory will be. There you have the database, config files, logs, etc. Before you restore the DB into the new pgsql, as far as I'm aware, you have to create/init this area. On Tue, Feb 15, 2011 at 2:27 PM,

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Sairam Krishnamurthy
Scott, I have 755 permission until "/media/extension/var/lib" and postgres owns the folder from postgresql. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 02/15/2011 04:48 PM, Scott Mead wrote: On Feb 15, 2011 5:44 PM, "Sairam Krishnamurthy" > wrote: > > Agai

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Scott Mead
On Feb 15, 2011 5:44 PM, "Sairam Krishnamurthy" wrote: > > Again, > > pg_ctl: could not open PID file "/media/extension/var/lib/postgresql/8.4/main/postmaster.pid": Permission denied > > Tried all the different ownership possible. What about the permissions on your mountpoint? Are they too restr

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Sairam Krishnamurthy
Again, pg_ctl: could not open PID file "/media/extension/var/lib/postgresql/8.4/main/postmaster.pid": Permission denied Tried all the different ownership possible. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 02/15/2011 04:37 PM, Scott Mead wrote: On Tue, Feb 15, 2011 at 5:32 PM, Sai

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Scott Mead
On Tue, Feb 15, 2011 at 5:32 PM, Sairam Krishnamurthy wrote: > Scott, > > I get this error. > > server starting > krishnam@nipa-umh:/media/extension/var/lib$ postgres: invalid argument: > "config_file=/etc/postgresql/8.4/main/postgresql.conf" > > tried with both -o and -c arguments. > My mistake

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Sairam Krishnamurthy
Scott, I get this error. server starting krishnam@nipa-umh:/media/extension/var/lib$ postgres: invalid argument: "config_file=/etc/postgresql/8.4/main/postgresql.conf" tried with both -o and -c arguments. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 02/15/2011 04:27 PM, Scott Mead wrote

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Scott Mead
On Tue, Feb 15, 2011 at 4:58 PM, Sairam Krishnamurthy wrote: > None. The log is empty. > Can you manually start the database as the postgres user: /usr/lib/postgresql/8.4/bin/pg_ctl start -D /media/extension/var/lib/postgresql/8.4/main/ -o config_file="/etc/postgresql/8.4/main/postgresql.conf"

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Sairam Krishnamurthy
Can you explain a bit? I dint get what you mean data area. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 02/15/2011 04:09 PM, Frederiko Costa wrote: I would recommend to create the data area in the destination pgsql server and dump the source database into it, rather than copying the data di

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Frederiko Costa
I would recommend to create the data area in the destination pgsql server and dump the source database into it, rather than copying the data directory. On Tue, Feb 15, 2011 at 1:41 PM, Sairam Krishnamurthy wrote: > All, > > I am using Ubuntu 10.04 and Postgres 8.4, I have been trying to move > my

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Sairam Krishnamurthy
None. The log is empty. Thanks, Sairam Krishnamurthy +1 612 859 8161 On Tue, Feb 15, 2011 at 3:45 PM, Scott Mead wrote: > > On Tue, Feb 15, 2011 at 4:41 PM, Sairam Krishnamurthy > wrote: >> >> All, >> >> I am using Ubuntu 10.04 and Postgres 8.4, I have been trying to move >> my data dir to a

Re: [ADMIN] Moving the data directory

2011-02-15 Thread Scott Mead
On Tue, Feb 15, 2011 at 4:41 PM, Sairam Krishnamurthy wrote: > All, > > I am using Ubuntu 10.04 and Postgres 8.4, I have been trying to move > my data dir to another device for the past couple of days but ran into > a lot of problems. > > I did the following: > > 1. Copy the contents of /var/lib/p

[ADMIN] Moving the data directory

2011-02-15 Thread Sairam Krishnamurthy
All, I am using Ubuntu 10.04 and Postgres 8.4, I have been trying to move my data dir to another device for the past couple of days but ran into a lot of problems. I did the following: 1. Copy the contents of /var/lib/postgresql/8.4/main to my folder. 2. Changed the data_directory in postgresql.