Restoring a database from a file system snapshot

Поиск
Список
Период
Сортировка
От William Garrison
Тема Restoring a database from a file system snapshot
Дата
Msg-id 48B594C3.3070407@mobydisk.com
обсуждение исходный текст
Ответы Re: Restoring a database from a file system snapshot  (Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com>)
Re: Restoring a database from a file system snapshot  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
I have a PostgreSQL database on Windows Server 2003, and the database is
kept on a SAN that has the ability to make instantaneous snapshots.
Once I have made such a snapshot, I am unclear how to re-attach it to
another postgres database on another machine.  Postgres seems to create
a directory structure that looks like this:
    Z:\MyDatabase
    Z:\MyDatabase\PG_VERSION
    Z:\MyDatabase\1234567
    Z:\MyDatabase\lots of files...
The "1234567" number above changes with each new database I create.

So to restore a snapshot, I create a new database, which makes a
X:\NewDatabase\98765 directory.  Do I then drop the contents of the
Z:\MyDatabase\1234567\* inside of the X:\NewDatabase\98765?  I attempted
this some time ago, and postgres refused to start.  (I haven't tried it
again so I don't know the exact error).  I got the impression that this
is not the correct procedure, since the number (which I think
corresponds to the hard link inside C:\Program
Files\PostgreSQL\8.3\data\pg_tblspc) did not match.  I am not sure what
else must be altered in order for the snapshot to "attach"

Any suggestions?  Is my procedure correct?  Would I need to also copy
the transaction logs or something like that?

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

Предыдущее
От: William Garrison
Дата:
Сообщение: Re: Do I have a corrupted database?
Следующее
От: Joao Ferreira gmail
Дата:
Сообщение: Re: Restoring a database from a file system snapshot