Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1shSDC-001kX3-RK for pgsql-general@arkaria.postgresql.org; Fri, 23 Aug 2024 11:12:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1shSDA-00C1vc-Ss for pgsql-general@arkaria.postgresql.org; Fri, 23 Aug 2024 11:12:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1shSDA-00C1vT-Hv for pgsql-general@lists.postgresql.org; Fri, 23 Aug 2024 11:12:09 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1shSD7-00136A-23 for pgsql-general@lists.postgresql.org; Fri, 23 Aug 2024 11:12:07 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 9BBFAB590; Fri, 23 Aug 2024 13:12:02 +0200 (CEST) Date: Fri, 23 Aug 2024 13:12:02 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: How to validate restore of backup? Message-ID: <20240823111202.fnlilxxsoojg3tbg@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: <20240823061340.hxsf3kfwweoez5tf@hjp.at> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2bgort2dwcx4m3sy" Content-Disposition: inline In-Reply-To: <20240823061340.hxsf3kfwweoez5tf@hjp.at> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2bgort2dwcx4m3sy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-08-23 08:13:40 +0200, Peter J. Holzer wrote: > On 2024-08-22 16:09:47 +0500, Muhammad Usman Khan wrote: > > For validation of databases, you can use the following approach > >=20 > > /usr/pgsql-16/bin/pg_dump -d postgres -h localhost -p 5428 | md5sum > /= var/lib/ > > pgsql/db1.txt > > /usr/pgsql-16/bin/pg_dump -d postgres -h localhost -p 5420 | md5sum > /= var/lib/ > > pgsql/db2.txt > > diff db1.txt db2.txt > >=20 > > By executing above queries, if diff is null then it means there is no > > difference between source and destination databases. >=20 > But on the other hand, if the diff is null, it doesn't mean there is a That should have read "if the diff is NOT null", of course. > (meaningful) difference between the databases. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --2bgort2dwcx4m3sy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmbIbnsACgkQ8g5IURL+ KF31NhAAibNjHObHsDuQMyYoOy530CoeGXo7yamRuzBpB/2IqbvEexkY2gkdPUVI ybbCCiUjmbTiiaXbtdzysW2Cz5Rmh2B/GAXqR3dSa3hUjmC/wWbRFTmhnrAdjvHn li/kodq1EfAGluvfIduNi5yoo1sy2DsdGCtChEPQbmwdsdIIt5hY7FUmUztIjU26 lwIiIHqoet9vEHNmLRZbV1zyt9XkmuZdZ4eWRLtL1uo7FibUSQ41VnKZ+QCohNge ZtDVUNY0K7nMNbCE4E2VD7D0xmwXeC2JWt5sR7DfjLuyEf8RvNowJ3GDfOpqiefu LKKemF/Fol76SsZ/RzQaDSYekNrlph0tdcX09RKthWx5M+iGGwOUX8Y4+CwWIo07 0f+nEjpQJ8VeQJHN+15MvckBe+Wju6grjTOFokTqBqYnzBuPuTEQurEIUz6jPLG7 zDT1FszqmnUO9wJZ/bGafSKg2wGNRCvz3Kv8QudAwtQboJCvIYngy6osme0AAxuu Bqpw+k8oHkJj7oTVFeyIfPJ4GvuoKw1+1l/mUVQIYqkGtrrnjjLPczERSsS4XTGB fwav35mvsWyQcgr+7dgVID0FuzOpplXeB1vIiVUTT+3XaZ+kav1EzY6MbnVeAOi8 Gham/Uns3Dijnbx3v+g3lvnYqxniF3nLqe5NfsRK7e9L+tItdFM= =Xbbo -----END PGP SIGNATURE----- --2bgort2dwcx4m3sy--