Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7D1821337B68 for ; Mon, 20 Dec 2010 15:43:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 79781-07 for ; Mon, 20 Dec 2010 19:43:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id C631A1337B5B for ; Mon, 20 Dec 2010 15:43:05 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Mon, 20 Dec 2010 13:43:05 -0600 Message-Id: <4D0F5D650200002500038840@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Mon, 20 Dec 2010 13:43:01 -0600 From: "Kevin Grittner" To: , "=?ISO-8859-15?Q?I=F1igoMartinez=20Lasala?=" Subject: Re: Data duplication when moving datafiles from one server to another. References: <1292872960.20992.8.camel@deimos> In-Reply-To: <1292872960.20992.8.camel@deimos> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/135 X-Sequence-Number: 36364 IņigoMartinez Lasala wrote: > Yesterday we experienced some data duplication in several database > tables after one sysadmin decided to test in a production > environment an rsync script in order to migrate a database from > one server to another one. > Postgresql (8.2) was running in source server and rsync script was > launched from second one. Second one server had a one day old copy > of the same database. Rsync script create a datafile replica in > destination server. > Our sysadmin swear he didn't launch the script in a reverse way > (that is, from destination to source)... so my question is > How this data duplication could happen? Where did this duplication happen -- source or destination? If in the source, I would suspect operator error by your sysadmin; I have never seen rsync cause problems with the source files. If on the target, I would suspect that you didn't follow PITR recovery techniques properly. If you need to follow up on this, please include a few more details, like the exact PostgreSQL version from `select version();` and the exact version of the OS. The exact rsync statement(s) used would be good to see, too -- maybe from the bash history (or similar) on the machines. -Kevin