Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp3E6-000417-9y for pgsql-admin@arkaria.postgresql.org; Fri, 06 Dec 2013 21:46:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vp3E5-0006cp-Pq for pgsql-admin@arkaria.postgresql.org; Fri, 06 Dec 2013 21:46:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp3E5-0006cj-0p for pgsql-admin@postgresql.org; Fri, 06 Dec 2013 21:46:21 +0000 Received: from nm49.bullet.mail.bf1.yahoo.com ([216.109.114.65]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vp3Dw-0002QP-QS for pgsql-admin@postgresql.org; Fri, 06 Dec 2013 21:46:20 +0000 Received: from [66.196.81.171] by nm49.bullet.mail.bf1.yahoo.com with NNFMP; 06 Dec 2013 21:46:10 -0000 Received: from [98.139.212.251] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 06 Dec 2013 21:46:10 -0000 Received: from [127.0.0.1] by omp1060.mail.bf1.yahoo.com with NNFMP; 06 Dec 2013 21:46:10 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 885924.6209.bm@omp1060.mail.bf1.yahoo.com Received: (qmail 25839 invoked by uid 60001); 6 Dec 2013 21:46:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1386366370; bh=UDTJZpjnvsN3t6MikItVe7vIb0Im1Ihn6/aKuwBha08=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=AyVbUatheQP+m3vhhfBukLDPUpIGH70md4ZNZZ6Kc8zfXO/a4Y0O5psAxfS7tKRN9AE5vRb33NlkDtkeUY/0ksqNfZGPlMuaKM3qCgXT1BYpC9mNYwq3dnf8E+r3kOTSkp7ADGemv40hL6F3ZGXANxKdoR0QmqeIeg0x/8v/CMs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=LVp8/lFuk/Xm5Ao+IoDadCetHPxFiHmNlSk4K0gqS+YmAbeyc7tT8eCoDWiSg5XbhapxOtvjNCG5n04+WPnLNyOFOnXWdQ2Vrs5xrSbHvPr7jNEiHzz5OgXVOTYFZmSnWzx5E0TzbStd2QIM5Rj3N6SVBA6gZ/2yhcFmbZtz53A=; X-YMail-OSG: _5UAbscVM1ny3TN8G1NzaYRv9f2qfVgGi7ky2WveBQmO78F NYEaR3ZLdz4LjrWbGpZzc_dbuvwf.o6IryJv3c1pDwxUQ8LA0cpKxLheTA_0 fxsQMcSLEaWsQqe.jTEE6LZYAa1qSx4Onh53Tq26N3fM5xFZRfZj3.Hixg93 mu5J8px74JveA.xGD9.3tUDosJxQ.NU7tkLboDIlQPceE4dvo6XTgv8eNKo9 hr6vEu6BYXITKazhi.fM8cLz_s1h1klPFDI09xUkvsGKH53U0i0H0Cp9tI49 h3tHyFBomLdP1en1Ux5oxOIBBMzlJBuwYdAeE4YSurhmHPgfA96outhOua3P 1qBppJ1Z.qT7E2WUpJe4Idet8XwMBSyXQBfQ9iKI3EDzDQZNCkZznUJebKIS t6eXrpUX_nq_Dy4qA.qkanlhYM1HYhZUts0s2VlWZzQQ25NbvywkEaTvP3Fd eFp8gtlxqTkeCuWFw9fvKWd4XP.YcKH6_zLzindNBmBG9.9GckBhOq8tu3br GBbFkRrbWVSMFK494GAraM765AFts6CZXl5LWLmo48JqeQ5KU2DiqjihjZw_ FF1elBPcmeSC7yGTuML.vQyJuLrz_wElg Received: from [76.255.18.237] by web162901.mail.bf1.yahoo.com via HTTP; Fri, 06 Dec 2013 13:46:10 PST X-Rocket-MIMEInfo: 002.001, RGVuaXNoIFBhdGVsIDxkZW5pc2hAb21uaXRpLmNvbT4gd3JvdGU6Cj4gQ3JhaWcgSmFtZXMgPGNqYW1lc0BlbW9sZWN1bGVzLmNvbT4gd3JvdGU6Cj4.IEplZmYgRnJvc3QgPGplZmZAcGdleHBlcnRzLmNvbT4gd3JvdGU6Cj4.Pj4gQ3JhaWcgSmFtZXMgPGNqYW1lc0BlbW9sZWN1bGVzLmNvbT4gd3JvdGU6Cj4.Pj4KPj4.PiBBZnRlciBJIHJzeW5jIHRoZSBwb3N0Z3JlcyBkYXRhIGRpcmVjdG9yeSwgZG8gSSBuZWVkIHRoZSBXQUwKPj4.PiBmaWxlcyBmcm9tIHRoZSBzb3VyY2UgKHRoZXkncmUgb24gYSBzZXABMAEBAQE- X-Mailer: YahooMailWebService/0.8.169.609 References: <23125649.944094.1386343468257.JavaMail.root@mail.int.journyx.com> Message-ID: <1386366370.97863.YahooMailNeo@web162901.mail.bf1.yahoo.com> Date: Fri, 6 Dec 2013 13:46:10 -0800 (PST) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: Cold backup with rsync -- WAL files? To: Denish Patel , Craig James Cc: Jeff Frost , Payal Singh , "pgsql-admin@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Denish Patel wrote: > Craig James wrote: >> Jeff Frost wrote: >>>> Craig James wrote: >>>> >>>> After I rsync the postgres data directory, do I need the WAL >>>> files from the source (they're on a separate disk, not part of >>>> the postgres data directory)?=A0 Can/should=A0 I erase the WAL >>>> directory of the destination? >>> >>> Yes, you need the WAL files. >> >> Now I have two directly conflicting answers.=A0 You say the WAL >> files are needed even though the DB is shut off, and Payal Singh >> says I don't need the WAL files (but I don't think he cc'd the >> mailing list). >> >> Why are the WAL files necessary if the DB is shut off?=A0 Why >> can't they just be erased? >> >> It's a gigabyte of copying that I was hoping to avoid. > Payal is right. You don't need WAL for Cold backup. This experiment took far less time than reading the thread: kgrittn@Kevin-Desktop:~/pg/master$ pg_ctl -D Debug/data -m fast -w stop waiting for server to shut down.... done server stopped kgrittn@Kevin-Desktop:~/pg/master$ mkdir Debug/data/xlog2 kgrittn@Kevin-Desktop:~/pg/master$ mv Debug/data/pg_xlog/* Debug/data/xlog2/ kgrittn@Kevin-Desktop:~/pg/master$ rm -f Debug/data/logfile ; pg_ctl -D Deb= ug/data -l Debug/data/logfile -w start || cat Debug/data/logfile waiting for server to start........ stopped waiting pg_ctl: could not start server Examine the log output. LOG:=A0 database system was shut down at 2013-12-06 15:31:27 CST LOG:=A0 creating missing WAL directory "pg_xlog/archive_status" LOG:=A0 invalid primary checkpoint record LOG:=A0 invalid secondary checkpoint record PANIC:=A0 could not locate a valid checkpoint record LOG:=A0 startup process (PID 15471) was terminated by signal 6: Aborted LOG:=A0 aborting startup due to startup process failure Now, if you're very clever you might be able to copy just *selected* WAL files.=A0 You've gotta ask yourself a question: "Do I feel lucky?"=A0 Well, do ya?=20 -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin