tablespace restore

Поиск
Список
Период
Сортировка
От Vangelis Katsikaros
Тема tablespace restore
Дата
Msg-id 4CE664FB.1010708@yahoo.gr
обсуждение исходный текст
Ответы Re: tablespace restore  (Matthew Walden <matthew.walden@bcs.org>)
Re: tablespace restore  (John R Pierce <pierce@hogranch.com>)
Re: tablespace restore  (shl7c <skylar@ccri.com>)
Список pgsql-general
Hello

I use postgres 8.3.12 on machineA and 8.4.5 on machineB.

On machineA I have created a tablespace with
CREATE TABLESPACE tablelocation_name LOCATION '/my/location/machineA';

I then created a database with
CREATE DATABASE db_name TABLESPACE tablelocation;

I created tables, inserted data and created indexes.

I now want to "move" the db from '/my/location/machineA' of machine A to
'/other/location/machineB' of machine B. My question is how I can do a
filesystem backup/restore (I want to move the indexes too - too time
consuming to reindex).

Machine B already has a postgres running, and postgres on machine B
already has other databases. During this process I have no problem of
shutting down postgres.


I have tried some things unsuccessfully:
1)  - stop postgres on machine B
     - copy dir of tablelocation of machine A to
'/other/location/machineB' on machine B
     - start postgres on machine B
     - CREATE TABLESPACE tablelocation_name LOCATION
'/other/location/machineB';
       ERROR:  directory "/other/location/machineB" is not empty


Regards
Vangelis

В списке pgsql-general по дате отправления:

Предыдущее
От: Jayadevan M
Дата:
Сообщение: Re: Survey on backing up unlogged tables: help us with PostgreSQL development!
Следующее
От: Matthew Walden
Дата:
Сообщение: Re: tablespace restore