Search Postgresql Archives

Need some help on PG database transfer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am doing some tests on the file level copying for one of database in windows platform. Here is what I want to achieve.

copy files within PG tablespace folder where PG database resides to target machine. I want to attache the copied data to target PG database.


What I have done is

1. Database: ABCD, OID: 12345, tablespace: e:\pg_data\, obviously, e:\pg_data has a subfolder named 12345.
2. create database in target, named 2222, and it will create its own OID, for example, 16333, the folder 16333 will reside under BASE folder.
3. then I stop PG service, delete all files under ..\16333\*.*,
4. copy all files from e:\pg_data\12345\*.* to the folder in target server, ..\16333\.
5. start PG service in target machine. it looks like it pickup most of tables that are from its source database, ABCD.

But, It is missing tables and functions, compared to sources.

Is it doable for replicating data like that?

PG tablespace, does it contain all the data/tables in its table space folder?

Please comment.

Thanks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux