Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3C75F1337B67 for ; Tue, 1 Mar 2011 06:12:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 52582-03 for ; Tue, 1 Mar 2011 10:12:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id A8AC51337B39 for ; Tue, 1 Mar 2011 06:12:42 -0400 (AST) Received: by pwi15 with SMTP id 15so879916pwi.19 for ; Tue, 01 Mar 2011 02:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=tV4clARSljNO78iWFh+dYdTUsdHynC6oWIdUM82bl98=; b=t+J1YBrlB3mMflM6Z9SYa3XGLcyQlVw7GZVLGCKDah6EuOdg/lo7QRHPDAFObWdy48 YzS2ZL9RaTKztVOoo0aWKO0NXcmUZL7akmX9hneViI7+e1FYp74trfM3mFTQp8cfVuv+ P1X7S3tDaT4VB/2Erkhnj4XVvgYc8XqPmKBBc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=H/6SfgfLx2gaH6zDKMFBVp7MV+T6asaOVJnzUHcRTR48AJFeWuo2j708Hvu+7Fp3d0 P7rjPK7pELVjFvVQjo1M9Ik13l0KcFgLX/ApJqRTjDBnoV6qS/7bEfrpTXAWTSVP/Joz P94kU1pVrrT6qSuIl1Dpxzn00jbrnQ52JdLDs= Received: by 10.142.247.20 with SMTP id u20mr2439028wfh.249.1298974361604; Tue, 01 Mar 2011 02:12:41 -0800 (PST) Received: from [192.168.1.2] ([122.179.149.170]) by mx.google.com with ESMTPS id m10sm7277861wfl.23.2011.03.01.02.12.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Mar 2011 02:12:40 -0800 (PST) Subject: Re: Backup question Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Vibhor Kumar In-Reply-To: Date: Tue, 1 Mar 2011 15:43:22 +0530 Cc: pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <514EC5D0-4703-4073-8AD2-59E0A7E9893F@gmail.com> References: To: A B X-Mailer: Apple Mail (2.1082) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201103/6 X-Sequence-Number: 36878 On Mar 1, 2011, at 3:20 PM, A B wrote: >=20 > But what would happen if you > 1. run rsync > 2. throw server through the window and buy new server > 3. copy the rsynced data > 4. start server > now, what would happen? > I guess the server would think: uh-oh, it has crashed, I'll try to fix = it. This will give you Inconsisten Backup and PG will try to recover the = database > I understand that you will loose data, but will it be able to get > database in shape and running? May be Or may not be. I have seen scenario's where people had to use = pg_resetxlog=20 > And to reduce the amount of lost data, is there any clever "sync" > command I can run before step 1 to write more stuff to disk? Have a look of Hot/Online Backup. http://www.postgresql.org/docs/8.4/interactive/continuous-archiving.html Thanks & Regards, Vibhor=