Re: Snapshot as Backup

Поиск
Список
Период
Сортировка
От Jeff
Тема Re: Snapshot as Backup
Дата
Msg-id 20040116095429.0bbc6b86.threshar@torgo.978.org
обсуждение исходный текст
Ответ на Re: Snapshot as Backup  (Sai Hertz And Control Systems <sank89@sancharnet.in>)
Список pgsql-admin
On Wed, 14 Jan 2004 02:00:45 +0530
Sai Hertz And Control Systems <sank89@sancharnet.in> wrote:

>
> > and all the PostgreSQL files.  My question is if I restore this
> > snapshot will PostgreSQL work?  I know if doing a typical file
> > system backup of PostgreSQL I must first stop the postmaster or the
> > backup will not produce a useable PostgreSQL system.  Is it
> > necessary to stop the postmaster for this snapshot backup also?
> >

I've done testing on this. It works fine.
Just make sure you're doing a filesystem snapshot and not a "cp".
To PG it just looks like the power went out or some other failure.
It'll replay parts of its log and be on its merry way.  This is *much*
faster than using pg_dump / pg_restore, especially on huge db's.

If you are using xfs you may want to wrap the snapshot call with
xfs_freeze/unfreeze.

It may also be nice every once in a while to do a normal pg_dump..

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/

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

Предыдущее
От: Ashok Chauhan
Дата:
Сообщение: check for null value
Следующее
От: Tom Lane
Дата:
Сообщение: Re: can't create db from PHP