Am 15.02.2012 22:49, schrieb Duaine Hechler:
On 02/15/2012 03:07 PM, Adam Tauno Williams wrote:
I have a single Postgres db that I would like to move it into /home. How can this be done ?
On Wed, 2012-02-15 at 14:41 -0600, Duaine Hechler wrote: pg_dump / pg_restore ?
Seriously, that is the only way I'd move an individual database.
But I'm not sure what you mean by "move it into /home".
It's for my home business accounting and every time I upgrade, I keep getting into trouble - somehow - and have to scramble to get it restored.
In my other post I described how to move the DB datadirectory. As you mention upgrades it is really is necessary to do a pg_dump before you upgrade postgresql to a newer release by yast or manually by installing a newer release package by EnterpriseDB. In the scenario of a operating system upgrade it only makes sense to move the db-data-directory to /home if /home sits on an own partition. Then still Adam is right. You need to do a pg_dump as PG's major release most likely will have changed in the time a new SUSE distro got put together. So I suppose your /home sits on an own partition. Even better add another harddrive and setup a soft-raid1 so that a partition on both drives get mirrored in case one drive kicks the bucket. Mount it e.g. to /raid. Mind you, as I installed OpenSuse 12.1 there was a bug in systemd that prohibited booting with a mounted raid1 even though it hadn't / in it. When I switched systemd against sysinit while I installled OpenSuse 12.1 the problem disapeared. Maybe it is fixed by now. so 1) do a pg_dump 2) install your suse system upgrade 3) stop the pg-server 4) move the data-dir as I described in my earlier post to /home/pgsql or /raid/pgsql 5) restart the pg-server 6) then import the dumped database done -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org