Mailinglist Archive: opensuse (1483 mails)

< Previous Next >
Re: [opensuse] Moving one Postgres db
Am 16.02.2012 02:12, schrieb Duaine Hechler:
On 02/15/2012 06:17 PM, Andreas wrote:
Am 15.02.2012 21:41, schrieb Duaine Hechler:
I have a single Postgres db that I would like to move it into /home.

How can this be done ?


rather easy

make a backup of your database with pg_dump just in case
ideally we won't need it, though

shut down the pg server

rcpostgresql stop
move the datadirectory somewhere else
start yast
--> applications
--> postgresql
--> postgresql_datadirectory
set the path to where you like it
--> Finish
close yast
restart the pg server
rcpostgresql start

done

WOW .... that was easy. Now, will I have to change that is I need to reinstall from scratch ?

In case you just want to move the data directory you don't need to reinstall anything.
PG just needs to know where it's data directory is.
Of course you can't move the data directory while the pg-server is running.


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >