pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Jean-Armel Luce <jaluce06@gmail.com>
Cc: [ADMIN] <pgsql-admin@postgresql.org>
Subject: Re: rsync and streaming replication
Date: Mon, 14 Nov 2011 11:15:10 -0700
Message-ID: <1B7A9CF6-33A8-43CA-9D55-2ED9F0A69CB9@elevated-dev.com> (raw)
In-Reply-To: <CALnckSqdG0aQ09nUhUeGWZ8SC8J25WEHHe4wD0jnz7K2+Kov5A@mail.gmail.com>
References: <CALnckSpEi-6JjfEFLUcp13nScHbbcywFcmhn51iK2sj_eXbEkQ@mail.gmail.com>
	<87pqgxf8p9.fsf@comcast.net>
	<CALnckSqDpZi=_w8XckMLBHu_V4kgtn+EqNsqFcNgLtbcYorzDA@mail.gmail.com>
	<CAF6yO=0UEB82UP2Lusd2xfrY+7TyVpn9pcFdDv1=_w9Rf=FqXg@mail.gmail.com>
	<CALnckSqdG0aQ09nUhUeGWZ8SC8J25WEHHe4wD0jnz7K2+Kov5A@mail.gmail.com>

I think there have been two similar threads recently, and I want to be sure I'm not confusing them. So:

- How large is the db? By which I mean how much disk space does the data directory occupy?

- What's the bandwidth of the network connection to the distant slave?

- What's the CPU & disk on each end?

On Nov 14, 2011, at 10:59 AM, Jean-Armel Luce wrote:

> For example, the rsync commands I am using are for data and logs are (I have 2 databases, 1 tablespace per database):
> rsync -a /var/opt/hosting/db/slony/pg_xlog/* slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/slony/pg_xlog/
> rsync -a /var/opt/hosting/db/profiles/bench/* slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/profiles/bench/
> rsync -a /var/opt/hosting/db/profiles/profiles/* slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/profiles/profiles/

Well, there's one error. Your command is rsync'ing each file individually, so of course each file is sync'd. Sync the directories instead--in other words leave off the * (but not the /) and let rsync decide which files need sync'ing.


-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice







view thread (26+ messages)  latest in thread

Message-ID: <1B7A9CF6-33A8-43CA-9D55-2ED9F0A69CB9@elevated-dev.com>
Permalink:  ../1B7A9CF6-33A8-43CA-9D55-2ED9F0A69CB9@elevated-dev.com/
Also on:    postgresql.org/message-id/1B7A9CF6-33A8-43CA-9D55-2ED9F0A69CB9@elevated-dev.com

 · 

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: scott_ribe@elevated-dev.com, jaluce06@gmail.com
  Subject: Re: rsync and streaming replication
  In-Reply-To: <1B7A9CF6-33A8-43CA-9D55-2ED9F0A69CB9@elevated-dev.com>

* 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