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
  #1  
Old   
Andreas Kraftl
 
Posts: n/a

Default Change datadir - 05-24-2008 , 01:06 AM






Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

What is the best way to change the datadir from /var/lib/postgresql
to, for example, /data/postgresql.

Thx
Andreas
--
Kraftl EDV - Dienstleistungen
Linuxschulungen, Weblösungen, Linuxlösungen
http://www.kraftl.at

Reply With Quote
  #2  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 01:35 AM






Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

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.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


Reply With Quote
  #3  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 01:35 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

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.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


Reply With Quote
  #4  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 01:35 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

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.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


Reply With Quote
  #5  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 01:35 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

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.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


Reply With Quote
  #6  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 01:35 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

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.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


Reply With Quote
  #7  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 01:35 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

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.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


Reply With Quote
  #8  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 01:35 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

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.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


Reply With Quote
  #9  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 01:35 AM



Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
Quote:
Hello,

I have a newly installed postgresql-8.3 on a debian 4.0 machine.
I installed it from backports.org.

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.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


Reply With Quote
  #10  
Old   
Andreas Kraftl
 
Posts: n/a

Default Re: Change datadir - 05-24-2008 , 02:30 AM



Am Sat, 24 May 2008 08:35:02 +0200 schrieb Andreas Kretschmer:
Quote:
Andreas Kraftl <andreas.kraftl (AT) kraftl (DOT) at> wrote:
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.

Thx
Andreas
--
Kraftl EDV - Dienstleistungen
Linuxschulungen, Weblösungen, Linuxlösungen
http://www.kraftl.at


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.