dbTalk Databases Forums  

Change datadir

comp.databases.postgresql comp.databases.postgresql


Discuss Change datadir in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Change datadir - 05-26-2008 , 01:39 AM






Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
What is the best way to change the datadir from /var/lib/postgresql to,
for example, /data/postgresql.

Stop the database, move the datadir to the new destination, change the
data_directory - value in your postgresql.conf to the new value, start
the server.

Hmmm, shame on me. I tried this way first only on Ubuntu, and it did not
work. On the Debian installation of the production server, I install yet,
it works perfect.
"It did not work": do you mean you got an error message when starting the
server? Do you remember the error message? Was it something like:

postgres cannot access the server configuration file
"/old/db/location/postgresql.conf": No such file or directory

Yours,
Laurenz Albe


Reply With Quote
  #22  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Change datadir - 05-26-2008 , 01:39 AM






Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
What is the best way to change the datadir from /var/lib/postgresql to,
for example, /data/postgresql.

Stop the database, move the datadir to the new destination, change the
data_directory - value in your postgresql.conf to the new value, start
the server.

Hmmm, shame on me. I tried this way first only on Ubuntu, and it did not
work. On the Debian installation of the production server, I install yet,
it works perfect.
"It did not work": do you mean you got an error message when starting the
server? Do you remember the error message? Was it something like:

postgres cannot access the server configuration file
"/old/db/location/postgresql.conf": No such file or directory

Yours,
Laurenz Albe


Reply With Quote
  #23  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Change datadir - 05-26-2008 , 01:39 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
What is the best way to change the datadir from /var/lib/postgresql to,
for example, /data/postgresql.

Stop the database, move the datadir to the new destination, change the
data_directory - value in your postgresql.conf to the new value, start
the server.

Hmmm, shame on me. I tried this way first only on Ubuntu, and it did not
work. On the Debian installation of the production server, I install yet,
it works perfect.
"It did not work": do you mean you got an error message when starting the
server? Do you remember the error message? Was it something like:

postgres cannot access the server configuration file
"/old/db/location/postgresql.conf": No such file or directory

Yours,
Laurenz Albe


Reply With Quote
  #24  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Change datadir - 05-26-2008 , 01:39 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
What is the best way to change the datadir from /var/lib/postgresql to,
for example, /data/postgresql.

Stop the database, move the datadir to the new destination, change the
data_directory - value in your postgresql.conf to the new value, start
the server.

Hmmm, shame on me. I tried this way first only on Ubuntu, and it did not
work. On the Debian installation of the production server, I install yet,
it works perfect.
"It did not work": do you mean you got an error message when starting the
server? Do you remember the error message? Was it something like:

postgres cannot access the server configuration file
"/old/db/location/postgresql.conf": No such file or directory

Yours,
Laurenz Albe


Reply With Quote
  #25  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Change datadir - 05-26-2008 , 01:39 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
What is the best way to change the datadir from /var/lib/postgresql to,
for example, /data/postgresql.

Stop the database, move the datadir to the new destination, change the
data_directory - value in your postgresql.conf to the new value, start
the server.

Hmmm, shame on me. I tried this way first only on Ubuntu, and it did not
work. On the Debian installation of the production server, I install yet,
it works perfect.
"It did not work": do you mean you got an error message when starting the
server? Do you remember the error message? Was it something like:

postgres cannot access the server configuration file
"/old/db/location/postgresql.conf": No such file or directory

Yours,
Laurenz Albe


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.