Re: Restarting DB after moving to another drive

From: Daniel Begin <jfd553(at)hotmail(dot)com>
To: "'Marc Mamin'" <M(dot)Mamin(at)intershop(dot)de>, "'Francisco Olarte'" <folarte(at)peoplecall(dot)com>
Cc: <rod(at)iol(dot)ie>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Restarting DB after moving to another drive
Date: 2015-05-11 18:01:14
Message-ID: COL129-DS17994AAC642173101C9F2594DB0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Interesting,

The symbolic links on the old drive -still used by the DB- look like
windows' shortcuts to parent folder, while they are empty folders in the
copy of the database I have on the new drive...

When I do a plane copy of those links on another drive I also get the same
empty folders. I am getting closer to the initial problem, and closer to
the solution!

Maybe an image backup of the drive would have done the job properly instead
of using a plane copy?
Daniel

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Marc Mamin
Sent: May-11-15 13:10
To: Daniel Begin; 'Francisco Olarte'
Cc: rod(at)iol(dot)ie; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Restarting DB after moving to another drive

Hi,
have you checked that the links in $PGDATA\pg_tblspc on the new drive are
valid ?
They possibly still point to the old drive.
I guess you have to correct them per hand before starting the moved DB.

regards,

Marc Mamin
________________________________________
Von: pgsql-general-owner(at)postgresql(dot)org
[pgsql-general-owner(at)postgresql(dot)org]&quot; im Auftrag von &quot;Daniel Begin
[jfd553(at)hotmail(dot)com]
Gesendet: Montag, 11. Mai 2015 17:30
An: 'Francisco Olarte'
Cc: rod(at)iol(dot)ie; pgsql-general(at)postgresql(dot)org
Betreff: Re: [GENERAL] Restarting DB after moving to another drive

Francisco wrote: "How big/critical is your database?"

How big? According to PgAdmin my personal database is about 2TB...
How critical? Well, about a year of work!-)

Francisco wrote: "just did a stop/cp/change pgdata /restart, I suppose
windows must have comparable ways"
This is what I have just tried when I got “Could not read symbolic link
“pg_tblspc/100589”: Invalid argument”

Considering both drives are identical, could an image backup have done the
job properly instead of a plane copy?
Daniel

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Francisco Olarte
Sent: May-11-15 11:01
To: Daniel Begin
Cc: rod(at)iol(dot)ie; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Restarting DB after moving to another drive

Hi Daniel.

On Mon, May 11, 2015 at 4:42 PM, Daniel Begin <jfd553(at)hotmail(dot)com> wrote:
> Just to make sure I understand properly...
> When I installed Postgresql, I set $PGDATA to point on my old drive
> and I must now move everything on the new one.
> In order to move everything on the new drive I must create a
> tablespace on the new drive and then explicitly define this tablespace
> as the new location of...
> - the postgres database
> - my personal database
> - pg_default
> - pg_global
> Anything I missed or put in the wrong sequence?

I do not think it is that easy. You can move nearly everything, but it will
be slow an you are not going to get rid of the old disk.

One question, ¿ How big/critical is your database ? because all your
problems can be solved with a dump/initdb/restore easily, and if you can
leave it doing overnight it is th easier way. Also, I've moved directories
across disks before, and it has worked, but I use linux which is much
simpler, and just did an stop / cp / change pgdata / restart, I suppose
windows must have comparable ways.

Francisco Olarte.

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2015-05-11 19:05:15 Re: Why does this SQL work?
Previous Message Marc Mamin 2015-05-11 17:10:06 Re: Restarting DB after moving to another drive