pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Fujii Masao <masao.fujii@gmail.com>
To: Alex Lai <alai@sesda2.com>
Cc: Vinay <vinay.dhoom@gmail.com>
Cc: Karuna Karpe <karuna.karpe@os3infotech.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: streaming replication
Date: Mon, 07 Nov 2011 11:10:03 -0600
Message-ID: <4EB7BC8B0200002500042AFF@gw.wicourts.gov> (raw)
In-Reply-To: <4EB80391.1020809@sesda2.com>
References: <CAC-Lqbq7mKzxcNG+cRtUT2vNqh=qY6kXttLeumQkd5vdEsbTVg@mail.gmail.com>
	<CACP4ndiOQZfQ1W5NVNTp0Xvan_RQC+9zQ3=FDe8H1K5szPj+SQ@mail.gmail.com>
	<CAC-Lqbpb5-vETngn-Sc=ab3T=HdWT5GarOpaUjA2O3UuyZ922g@mail.gmail.com>
	<CAHGQGwHn8DLQF1vPaizJzwtFk+Y0ciML-zjXct_y6NmZ+BFy6g@mail.gmail.com>
	<4EB80391.1020809@sesda2.com>

Alex Lai <alai@sesda2.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@host::module /dest

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

-Kevin



view thread (13+ messages)  latest in thread

Message-ID: <4EB7BC8B0200002500042AFF@gw.wicourts.gov>
Permalink:  ../4EB7BC8B0200002500042AFF@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4EB7BC8B0200002500042AFF@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, masao.fujii@gmail.com, alai@sesda2.com, vinay.dhoom@gmail.com, karuna.karpe@os3infotech.com
  Subject: Re: streaming replication
  In-Reply-To: <4EB7BC8B0200002500042AFF@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox