Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQecj-0005Fw-6P for pgsql-general@arkaria.postgresql.org; Tue, 14 May 2019 21:06:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQech-0000Wl-Lp for pgsql-general@arkaria.postgresql.org; Tue, 14 May 2019 21:06:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQech-0000Wd-C1 for pgsql-general@lists.postgresql.org; Tue, 14 May 2019 21:06:07 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQecc-0007vx-88 for pgsql-general@lists.postgresql.org; Tue, 14 May 2019 21:06:07 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A7633239CD; Tue, 14 May 2019 17:06:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 14 May 2019 17:06:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=X kHADpVNPbkUlHBxDqS5aOtq9sX5IKn+gUlIwrTlCWY=; b=cYTqVdSJgzvRaxcFU JUbaQEPxapVacrIM3VAlEWP7sUqQd72kOM0ipkgftwN2yvldz93ORfcqX6pd97Ib +bNNG4AM4v/6mKUb6o7NC0HXPcQFgRRXToFuSM6aGwKbM3dd4biC6HTQ8KVb7jSw iTG/RzCVcfT6LT8Yje+6KSsLZsuXCJs6lthgYxAZlbnPx9IGGDfUhAWLmGdhWh4T vTEK6SPTie1KAYUbcuddeQQHyu8BH+8quX+BFb+IXtCmXCZOT2uVT/SMa6f8/6ft htJt0weQJI6q8lJT3fdcPsv/1DeyDRHtODHYxPeJIcl/duZuvnzsUeXZ1gXf6WPT kx8bA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=XkHADpVNPbkUlHBxDqS5aOtq9sX5IKn+gUlIwrTlC WY=; b=cz9UBClwHhiP3Q/FjKM7O4Lvi7QKqiK1ZVxyheXekWcxt5M04XDEedysV eFx4xNnWdpijxGLzk63iXvROv5Wj2VDVrA3SEp4Iy6B7EgXS/CHa7LvKx3bXehjN nQ26NbDg/IevUyJDr7sr85YqaYtd8f3fvdAIUCvItq6gDj9fJHCWLigsDfZFvNyT UQAYNQ6ghfTzpcwBbUmZrLet/P8RO07scGBEow1PKM57s9NK4w6DFaFRv6qhPw7h 1QFaVgmk92a5KrtiIPy7BiZqXV0G7FRwF8fNoKuozo9N8Dw+spbYROCx7DI7mUeq 5pZWC5a1nADxrrK8WqFYIs3n67KfA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrleeigdduheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 6BCB0103D4; Tue, 14 May 2019 17:05:59 -0400 (EDT) Subject: Re: Table update: restore or replace? To: Rich Shepard , pgsql-general@lists.postgresql.org References: <5fb66fe3-0aa0-3d6d-db53-172a6c3f1a30@aklaver.com> From: Adrian Klaver Message-ID: Date: Tue, 14 May 2019 14:05:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/14/19 1:59 PM, Rich Shepard wrote: > On Tue, 14 May 2019, Adrian Klaver wrote: > >> A file level backup or database dump? > > Adrian, > > File level. April 20th is my most recent database dump because I forgot to > run it last Friday afternoon. Does the table you overwrote the data change much? If not it might be safer to just fetch it from the April 20th dump and then apply the changes since then. If you where to restore at the file level I would: 1) Stop the server. 2) Move the existing content of /var/lib/pgsql/10/data/ somewhere else just to be safe. 3) Copy in the backup. > > Rich > > > -- Adrian Klaver adrian.klaver@aklaver.com