Skip site navigation (1) Skip section navigation (2)

Re: streaming replication

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>,"Alex Lai" <alai(at)sesda2(dot)com>
Cc: "Vinay" <vinay(dot)dhoom(at)gmail(dot)com>, "Karuna Karpe" <karuna(dot)karpe(at)os3infotech(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: streaming replication
Date: 2011-11-07 17:10:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Alex Lai <alai(at)sesda2(dot)com> wrote:
> Fujii Masao wrote:

>> What about using rsync to take a base backup from new master and
>> load it onto old master? rsync can reduce the backup time by
>> sending only differences between those two servers.

> My postgres instance has two databases.  The pg_dump size is about
> 30GB size.  Rsync the entire $PGDATA take about an hour to a empty
> directory.  When I rsync the $PGDATA to the existing directory, it
> still take 50 minutes.  It seems to me that rsync still spend most
> of the time checking any changes even with very little changes. 
> Maybe I miss some option when using rsync can speed up the update.

If the bottleneck is the network, be sure that you are using a
daemon on the remote side; otherwise you do drag all the data over
the wire for any file which doesn't have an identical timestamp and
size.  An example of how to do that from the rsync man page:

rsync -av -e "ssh -l ssh-user" rsync-user(at)host::module /dest

This will try to identify matching portions of files and avoid
sending them over the wire.


In response to


pgsql-admin by date

Next:From: Kevin GrittnerDate: 2011-11-07 17:16:06
Subject: Re: pg_dump from 8.4 to 8.3
Previous:From: Kieren ScottDate: 2011-11-07 16:54:01
Subject: pg_dump from 8.4 to 8.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group