Обсуждение: How to do hot backup using postgres

Поиск
Список
Период
Сортировка

How to do hot backup using postgres

От
tuanhoanganh
Дата:
I tried to do pitr backup using Postgres 8.3.9 on windows. So I issued SELECT pg_start_backup('test');
After I put the db in backup mode I tried to zip the data directory files with 7z. However I encountered the following errors:

The process cannot access the file because it is being used by another process.
C:\...\8.3\data\global1214
The process cannot access the file because it is being used by another process.
C:\...\8.3\pg_xlog\00000001000000070000001B
...
...
But zip file was created.
Is it error ?
How can I zip the files and perform a hot backup on windows?

Re: How to do hot backup using postgres

От
tuanhoanganh
Дата:
Can anyone answer me ?
Thanks you very much

Tuan Hoang Anh

On Sat, Aug 14, 2010 at 10:00 AM, tuanhoanganh <hatuan05@gmail.com> wrote:
I tried to do pitr backup using Postgres 8.3.9 on windows. So I issued SELECT pg_start_backup('test');
After I put the db in backup mode I tried to zip the data directory files with 7z. However I encountered the following errors:

The process cannot access the file because it is being used by another process.
C:\...\8.3\data\global1214
The process cannot access the file because it is being used by another process.
C:\...\8.3\pg_xlog\00000001000000070000001B
...
...
But zip file was created.
Is it error ?
How can I zip the files and perform a hot backup on windows?

Re: How to do hot backup using postgres

От
Ray Stell
Дата:
On Tue, Aug 17, 2010 at 11:02:20AM +0700, tuanhoanganh wrote:
> On Sat, Aug 14, 2010 at 10:00 AM, tuanhoanganh <hatuan05@gmail.com> wrote:
> > The process cannot access the file because it is being used by another
> > process.
> > C:\...\8.3\pg_xlog\00000001000000070000001B

Exclude pg_log from the backup or rm that file at the recovery:

"You can, however, omit from the backup dump the files within the pg_xlog/
subdirectory of the cluster directory. This slight complication is
worthwhile because it reduces the risk of mistakes when restoring."
http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html