Re: Backup question - Mailing list pgsql-admin

From Vibhor Kumar
Subject Re: Backup question
Date
Msg-id 514EC5D0-4703-4073-8AD2-59E0A7E9893F@gmail.com
Whole thread Raw
In response to Backup question  (A B <gentosaker@gmail.com>)
List pgsql-admin
On Mar 1, 2011, at 3:20 PM, A B wrote:

>
> But what would happen if you
> 1. run rsync
> 2. throw server through the window and buy new server
> 3. copy the rsynced data
> 4. start server
> now, what would happen?
> I guess the server would think: uh-oh, it has crashed, I'll try to fix it.

This will give you Inconsisten Backup and PG will try to recover the database

> I understand that you will loose data, but will it be able to get
> database in shape and running?
May be Or may not be. I have seen scenario's where people had to use pg_resetxlog

> And to reduce the amount of lost data,  is there any clever "sync"
> command I can run before step 1 to write more stuff to disk?

Have a look of Hot/Online Backup.
http://www.postgresql.org/docs/8.4/interactive/continuous-archiving.html

Thanks & Regards,
Vibhor

pgsql-admin by date:

Previous
From: A B
Date:
Subject: Backup question
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Re: PD_ALL_VISIBLE flag was incorrectly set happend during repeatable vacuum