RE: Initialising a mirror

This is a discussion on RE: Initialising a mirror within the Rsync forums, part of the Networking and Network Related category; Message en plusieurs parties au format MIME --===============1470178700== Content-Type: multipart/alternative; boundary="=_alternative 00349CEEC125709F_=" Message en plusieurs ...


Go Back   Usenet Forums > Networking and Network Related > Rsync

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-19-2005
Cyrille Bollu
 
Posts: n/a
Default RE: Initialising a mirror

Message en plusieurs parties au format MIME
--===============1470178700==
Content-Type: multipart/alternative;
boundary="=_alternative 00349CEEC125709F_="

Message en plusieurs parties au format MIME
--=_alternative 00349CEEC125709F_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,=20

thank you for your answer.

But what do you mean by "slow rsync"? Do you mean limiting bandwith? I=20
think this will not be an option with 100Gb of data to synchronise...

However, I like your idea with the LAN: I think I will bring my mirror to=20
the remote site :-)

Just for the record, I didn't made the standard mistake, having things one =

directory level off from where they should be.

I was hoping doing a "scp -rp" would preserve all the necessary=20
information needed by rsync but apparently not... Maybe I should use tar?

Regards,

Cyrille

<Tony@ServaCorp.com> a =E9crit sur 19/10/2005 11:00:07 :

> Standard mistake is to somehow get things one directory level off=20
> from where they should be.
>=20
> If you have the available disk space (both ends)
> Do a fast rsync from the primary to locally available fast disk=20
> space (same computer or LAN)
> Do a slow rsync from that disk space to another set of available=20
> disk space over slow/unreliable network.
> Assuming the slow rsync completed without problems,=20
> do a fast rsync from the second disk space to the legitimate=20

target..
>=20
> Source makes a big distinction between foo/ and foo
> They both transfer the same files.
> They differ in where they transfer the file to (BY ONE LEVEL)
> Both make sense and are quite reasonable.
> If you do both, the effects are similar to untarring twice with one=20
> level difference between them.
>=20
> I know I've done it a number of times, and it is no fun over remote=20
> and often bad internet connections.
> With large volumes, it is not apparent when you've done it to yourself.
>=20
>=20
> WARNING -- these scripts work but are probably not the best nor the
> most aesthetic.
> ---just a wee bit too informative and I'm too lazy to sanitize so=20
> I'm not posting to the list.---
> ?? hosts allow/deny ignore with auth users present ??=20
> The major sucurity concerns are NOT permanently losing all my data=20
> rather than eavesdroppers.
> The internet connection(s) are ocassionally flaky to non-existent,=20
> and everything needs to assume
> that they will chose the most inopportune moment to do something I don't =


like.
> Essentially the stunt is that /home/rsync-foo is rsync'd with other=20
> such over slow and bad connections.
> With bad internet I've got (not shown) multiple off-site backups AND
> the ability to bring them all upt-to-date
> if there is a connection (any, not necessarily the preferred -- some
> connect, some don't connect)
>=20
>=20
>=20
> ---Timing depends on what is different. Typically this one is about
> 10 to 15 minutes (about 10G) total.
> If large MySql tables are rearranged, tends to take rather longer.
> real 192m41.906s
>=20
>=20
> real 12m18.512s
> sent 13750 bytes received 7577551 bytes 10279.35 bytes/sec
> total size is 14013850399 speedup is 1846.04
> Tue Oct 18 07:28:00 CDT 2005
> rsync-sjs-dwg
> [root@wf1 /root]# cat rsync-sjs-dwg
> #!/bin/sh
>=20
> rsync client
> # staged backup
> time rsync -a /home/rsync-sjs-dwg/* /home/rsync-sjs-dwg-1bk/
>=20
> time rsync -avz --progress --partial --timeout=3D1750 --password-
> file=3D/etc/rsync.secrets/rsync-sjs-dwg \
> rsync-sjs-dwg@sjs::rsync-sjs-dwg/* /home/rsync-sjs-dwg/
> date; echo rsync-sjs-dwg
>=20
> ----rsync server (actually is an intermediate, not the primary)
> This is an extra "junk" computer with a decent hard drive.
> This serves to get a fast=20
> # etc/rsyncd.conf
> pid file =3D /etc/rsyncd.pid
> [rsync-sjs-dwg]
> comment =3D backup of sjs dwg
> path =3D /home/rsync-sjs-dwg
> use chroot =3D true
> read only =3D false
> list =3D false
> uid =3D root
> gid =3D root
> auth users =3D rsync-sjs-dwg
> secrets file =3D /etc/rsyncd.secrets
> strict modes =3D true
> hosts allow =3D 10.0.0.1 pete-162 wf
> hosts deny =3D *.*.*.*
> ---rsync "client" (This is a PRIMARY)
> [root@sys001 root]# cat rsync-sjs-dwg
> #!/bin/bash
> # rsync-sjs-dwg SJS=5FDrawings/ title/
> mkdir -p /tmp/rsync ; echo `hostname` > /tmp/rsync/OPENED
> rsync -a --password-file=3D/etc/rsync.secrets/sjs-dwg --timeout=3D750 \
> /tmp/rsync/OPENED rsync-sjs-dwg@10.0.0.170::rsync-sjs-dwg/
> for name in title SJS=5FDrawings ; do
> rsync -a --password-file=3D/etc/rsync.secrets/sjs-dwg --timeout=3D750 \
> /home/dwg/$name rsync-sjs-dwg@10.0.0.170::rsync-sjs-dwg/
> done
> mkdir -p /tmp/rsync ; echo `hostname` > /tmp/rsync/CLOSED
> rsync -a --password-file=3D/etc/rsync.secrets/sjs-dwg --timeout=3D750 \
> /tmp/rsync/CLOSED rsync-sjs-dwg@10.0.0.170::rsync-sjs-dwg/
> echo 'rsync-sjs-dwg'
> date
> date -u
>=20
>=20
>=20
>=20
>=20
> -----Original Message-----
> From: rsync-bounces+tony=3Dservacorp.com@lists.samba.org [mailto:
> rsync-bounces+tony=3Dservacorp.com@lists.samba.org]On Behalf Of Cyrille=20

Bollu
> Sent: Wednesday, October 19, 2005 2:58 AM
> To: rsync@lists.samba.org
> Subject: Initialising a mirror


>=20
> Dears,=20
>=20
> I would like to mirror data from 2 servers connected together via=20
> VPN over ADSL lines (dwn 2Mbps/Upld 512Kbps).=20
>=20
> I'm sure rsync is one of the best tool to keep these data in sync=20
> but how should I use it to initialise the mirror?=20
>=20
> I'm currently testing the solution with 10Gb of data to keep in=20
> sync. But on my lines it would take more than 40 hours to initially=20
> create the mirror! And in production the data to keep in sync will=20
> reach 100Gb... :-(=20
>=20
> So, I went with a laptop on the remote site and "scp -rp" the data=20
> on it. I then got back to my site and "scp -rp" it on the mirror to=20
> initialise it.=20
>=20
> But apparently I forgot something because when rsync still sends all
> the files from the remote site to my mirror when I first run it.=20
>=20
> Does anybody has an idea about what I'm doing wrong?=20
>=20
> Does anybody has a solution to this problem?=20
>=20
> Regards,=20
>=20
> Cyrille

--=_alternative 00349CEEC125709F_=
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"Arial">Hi, </font>
<br>
<br><font size=3D2 face=3D"Arial">thank you for your answer.</font>
<br>
<br><font size=3D2 face=3D"Arial">But what do you mean by &quot;slow rsync&=
quot;?
Do you mean limiting bandwith? I think this will not be an option with
100Gb of data to synchronise...</font>
<br>
<br><font size=3D2 face=3D"Arial">However, I like your idea with the LAN: I
think I will bring my mirror to the remote site :-)</font>
<br>
<br><font size=3D2 face=3D"Arial">Just for the record, I didn't made the st=
andard
mistake, having things one directory level off from where they should be.</=
font>
<br>
<br><font size=3D2 face=3D"Arial">I was hoping doing a &quot;scp -rp&quot;
would preserve all the necessary information needed by rsync but apparently
not... Maybe I should use tar?</font>
<br>
<br><font size=3D2 face=3D"Arial">Regards,</font>
<br>
<br><font size=3D2 face=3D"Arial">Cyrille</font>
<br>
<br><font size=3D2><tt>&lt;Tony@ServaCorp.com&gt; a =E9crit sur 19/10/2005
11:00:07 :<br>
<br>
&gt; Standard mistake is to somehow get things one directory level off
<br>
&gt; from where they should be.</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; If you have the available disk space (both ends=
)</tt></font>
<br><font size=3D2><tt>&gt; Do a fast rsync from the primary to locally ava=
ilable
fast disk <br>
&gt; space (same computer or LAN)</tt></font>
<br><font size=3D2><tt>&gt; Do a slow rsync from that disk space to another
set of available <br>
&gt; disk space over slow/unreliable network.</tt></font>
<br><font size=3D2><tt>&gt; Assuming the slow rsync completed without probl=
ems,
</tt></font>
<br><font size=3D2><tt>&gt; &nbsp; &nbsp; do a fast rsync from the second
disk space to the legitimate target..</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; Source makes a big distinction between foo/ and
foo</tt></font>
<br><font size=3D2><tt>&gt; They both transfer the same files.</tt></font>
<br><font size=3D2><tt>&gt; They differ in where they transfer the file to
&nbsp;(BY ONE LEVEL)</tt></font>
<br><font size=3D2><tt>&gt; Both make sense and are quite reasonable.</tt><=
/font>
<br><font size=3D2><tt>&gt; If you do both, the effects are similar to unta=
rring
twice with one <br>
&gt; level difference between them.</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; I know I've done it a number of times, and it
is no fun over remote <br>
&gt; and often bad internet connections.</tt></font>
<br><font size=3D2><tt>&gt; With large volumes, it is not apparent when you=
've
done it to yourself.</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; WARNING &nbsp;-- these scripts work but are pro=
bably
not the best nor the<br>
&gt; most aesthetic.</tt></font>
<br><font size=3D2><tt>&gt; ---just a wee bit too informative and I'm too
lazy to sanitize so <br>
&gt; I'm not posting to the list.---</tt></font>
<br><font size=3D2><tt>&gt; &nbsp; &nbsp; ?? hosts allow/deny ignore with
auth users present ?? </tt></font>
<br><font size=3D2><tt>&gt; The major sucurity concerns are NOT permanently
losing all my data <br>
&gt; rather than eavesdroppers.</tt></font>
<br><font size=3D2><tt>&gt; The internet connection(s) are ocassionally fla=
ky
to non-existent, <br>
&gt; and everything needs to assume</tt></font>
<br><font size=3D2><tt>&gt; that they will chose the most inopportune moment
to do something I don't like.</tt></font>
<br><font size=3D2><tt>&gt; Essentially the stunt is that /home/rsync-foo
is rsync'd with other <br>
&gt; such over slow and bad connections.</tt></font>
<br><font size=3D2><tt>&gt; With bad internet I've got (not shown) multiple
off-site backups AND<br>
&gt; the ability to bring them all upt-to-date</tt></font>
<br><font size=3D2><tt>&gt; if there is a connection (any, not necessarily
the preferred -- some<br>
&gt; connect, some don't connect)</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; ---Timing depends on what is different. &nbsp;T=
ypically
this one is about<br>
&gt; 10 to 15 minutes &nbsp;(about 10G) total.</tt></font>
<br><font size=3D2><tt>&gt; If large MySql tables are rearranged, tends to
take rather longer.</tt></font>
<br><font size=3D2><tt>&gt; real &nbsp; &nbsp;192m41.906s</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; real &nbsp; &nbsp;12m18.512s<br>
&gt; sent 13750 bytes &nbsp;received 7577551 bytes &nbsp;10279.35 bytes/sec=
<br>
&gt; total size is 14013850399 &nbsp;speedup is 1846.04<br>
&gt; Tue Oct 18 07:28:00 CDT 2005<br>
&gt; rsync-sjs-dwg</tt></font>
<br><font size=3D2><tt>&gt; [root@wf1 /root]# cat rsync-sjs-dwg<br>
&gt; #!/bin/sh</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; rsync client</tt></font>
<br><font size=3D2><tt>&gt; # staged backup<br>
&gt; time rsync -a /home/rsync-sjs-dwg/* /home/rsync-sjs-dwg-1bk/</tt></fon=
t>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; time rsync -avz --progress --partial --timeout=
=3D1750
--password-<br>
&gt; file=3D/etc/rsync.secrets/rsync-sjs-dwg \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; rsync-sjs-dwg@sjs::rsync-sjs-dwg/* /home/r=
sync-sjs-dwg/</tt></font>
<br><font size=3D2><tt>&gt; date; echo rsync-sjs-dwg</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; ----rsync server &nbsp; (actually is an interme=
diate,
not the primary)</tt></font>
<br><font size=3D2><tt>&gt; This is an extra &quot;junk&quot; computer with
a decent hard drive.</tt></font>
<br><font size=3D2><tt>&gt; This serves to get a fast </tt></font>
<br><font size=3D2><tt>&gt; # etc/rsyncd.conf</tt></font>
<br><font size=3D2><tt>&gt; pid file =3D /etc/rsyncd.pid</tt></font>
<br><font size=3D2><tt>&gt; [rsync-sjs-dwg]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; comment =3D backup of sjs dwg<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; path =3D /home/rsync-sjs-dwg<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; use chroot =3D true<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; read only =3D false<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; list =3D false<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; uid =3D root<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; gid =3D root<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; auth users =3D rsync-sjs-dwg<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; secrets file =3D /etc/rsyncd.secrets<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; strict modes =3D true<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; hosts allow =3D 10.0.0.1 pete-162 wf<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; hosts deny =3D *.*.*.*</tt></font>
<br><font size=3D2><tt>&gt; ---rsync &quot;client&quot; &nbsp;(This is a
PRIMARY)</tt></font>
<br><font size=3D2><tt>&gt; [root@sys001 root]# cat rsync-sjs-dwg<br>
&gt; #!/bin/bash<br>
&gt; # rsync-sjs-dwg &nbsp;SJS=5FDrawings/ title/<br>
&gt; mkdir -p /tmp/rsync ; echo `hostname` &gt; /tmp/rsync/OPENED<br>
&gt; rsync -a --password-file=3D/etc/rsync.secrets/sjs-dwg &nbsp;--timeout=
=3D750
\<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; /tmp/rsync/OPENED &nbsp; &nbsp; &nbsp;
rsync-sjs-dwg@10.0.0.170::rsync-sjs-dwg/</tt></font>
<br><font size=3D2><tt>&gt; for name in title SJS=5FDrawings ; do<br>
&gt; rsync -a --password-file=3D/etc/rsync.secrets/sjs-dwg --timeout=3D750
\<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; /home/dwg/$name &nbsp; &nbsp; &nbsp; &nbsp;
rsync-sjs-dwg@10.0.0.170::rsync-sjs-dwg/<br>
&gt; done</tt></font>
<br><font size=3D2><tt>&gt; mkdir -p /tmp/rsync ; echo `hostname` &gt; /tmp=
/rsync/CLOSED<br>
&gt; rsync -a --password-file=3D/etc/rsync.secrets/sjs-dwg &nbsp;--timeout=
=3D750
\<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; /tmp/rsync/CLOSED &nbsp; &nbsp; &nbsp;
rsync-sjs-dwg@10.0.0.170::rsync-sjs-dwg/</tt></font>
<br><font size=3D2><tt>&gt; echo 'rsync-sjs-dwg'<br>
&gt; date<br>
&gt; date -u</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; <br>
&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; &nbsp;</tt></font>
<br><font size=3D2><tt>&gt; -----Original Message-----<br>
&gt; From: rsync-bounces+tony=3Dservacorp.com@lists.samba.org [mailto:<br>
&gt; rsync-bounces+tony=3Dservacorp.com@lists.samba.org]On Behalf Of Cyrille
Bollu<br>
&gt; Sent: Wednesday, October 19, 2005 2:58 AM<br>
&gt; To: rsync@lists.samba.org<br>
&gt; Subject: Initialising a mirror<br>
</tt></font>
<br><font size=3D2><tt>&gt; <br>
&gt; Dears, <br>
&gt; <br>
&gt; I would like to mirror data from 2 servers connected together via
<br>
&gt; VPN over ADSL lines (dwn 2Mbps/Upld 512Kbps). <br>
&gt; <br>
&gt; I'm sure rsync is one of the best tool to keep these data in sync
<br>
&gt; but how should I use it to initialise the mirror? <br>
&gt; <br>
&gt; I'm currently testing the solution with 10Gb of data to keep in <br>
&gt; sync. But on my lines it would take more than 40 hours to initially
<br>
&gt; create the mirror! And in production the data to keep in sync will
<br>
&gt; reach 100Gb... :-( <br>
&gt; <br>
&gt; So, I went with a laptop on the remote site and &quot;scp -rp&quot;
the data <br>
&gt; on it. I then got back to my site and &quot;scp -rp&quot; it on the
mirror to <br>
&gt; initialise it. <br>
&gt; <br>
&gt; But apparently I forgot something because when rsync still sends all<b=
r>
&gt; the files from the remote site to my mirror when I first run it. <br>
&gt; <br>
&gt; Does anybody has an idea about what I'm doing wrong? <br>
&gt; <br>
&gt; Does anybody has a solution to this problem? <br>
&gt; <br>
&gt; Regards, <br>
&gt; <br>
&gt; Cyrille</tt></font>
--=_alternative 00349CEEC125709F_=--

--===============1470178700==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
--===============1470178700==--
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:32 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0