Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZxYb-00010N-LT for pgsql-general@arkaria.postgresql.org; Sat, 16 May 2020 14:12:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jZxYY-0002JO-B3 for pgsql-general@arkaria.postgresql.org; Sat, 16 May 2020 14:12:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZxYX-0002JH-Ta for pgsql-general@lists.postgresql.org; Sat, 16 May 2020 14:12:49 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZxYN-0000mO-Ot for pgsql-general@lists.postgresql.org; Sat, 16 May 2020 14:12:48 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 3297F308C; Sat, 16 May 2020 16:12:37 +0200 (CEST) Date: Sat, 16 May 2020 16:12:37 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Inherited an 18TB DB & need to backup Message-ID: <20200516141237.GC8152@hjp.at> References: <20200515130246.GB25570@campbell-lange.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0vzXIDBeUiKkjNJl" Content-Disposition: inline In-Reply-To: <20200515130246.GB25570@campbell-lange.net> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0vzXIDBeUiKkjNJl Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-05-15 14:02:46 +0100, Rory Campbell-Lange wrote: > On 15/05/20, Suhail Bamzena (suhailsalem@gmail.com) wrote: > > I have very recently inherited an 18 TB DB that is running version 9.2. > > Apparently this database has never been backed up [...] > A very simple solution could be just to dump the database daily with > pg_dump, if you have the space and machine capacity to do it. Depending > on what you are storing, you can achieve good compression with this, and > it is a great way of having a simple file from which to restore a > database. >=20 > Our ~200GB cluster resolves to under 10GB of pg_dump files, although > 18TB is a whole different order of size. I love pg_dump (especially the -Fd format), but for a database of that size it might be too slow. Ours is about 1TB, and =ABpg_dump --compress=3D5= -Fd=BB takes a bit over 2 hours. Extrapolating to 18 TB that would be 40 hours =2E.. And restoring the database takes even more time because it only restores the tables and has to rebuild the indexes. Still - for a first backup, just firing off pg_dump might be the way to go. Better to have a backup in two days than still none after two weeks because you are still evaluating the fancier alternatives. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --0vzXIDBeUiKkjNJl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl6/9NAACgkQ8g5IURL+ KF1KdA/9E8SHUreAZj3iO9EMOS+LhRrghjpVW1WraRAZpuz7g8NHz9yqbGfTCM/R 5yw9ydPQGyl5dZ5I608oh6Jj4bVXn6e06V0Di/5m88ELm2xSvd4CyxEjrLN1NZEJ fJ2PfhLIfivgxzU4Wq78j8PwZl2lj8O7MK8K5uYy9iTc8X7xkWyEphhk3reAUwQP bG7DUN5ixsT5yU0bfukfuVpWrzU8BFgQHiqGuto38ps9dPUiIMKLfGmO99KBtLnm R4/T/0HfBSNoOSkO98pwwHJAb9SiVYPVyCWXNDHcCWW7GUeDsVCiE5v30cFZierq u3XUTIa/t+CI9ofvurfTdy6RNqhVrZGKhX9So9JubzxjThIUVtXsWRKmo6a+H0Hs VwTjG/v0hNpodCU4uHJ4ZXKvJ9tstMpOD3K3263mzRyqOlTI0P73uFmSUyuIxRgD No9/LqHxGl5VC0kHr6+P28RG+SnY7NPLviG/bQTve9vJBHP+x5kGNBXAeTufG0vw tFz+kk0N6ibO4lZm28wFD5AeHS7jlDs7Z0wfTzQWoAU6EcWB8e5mIZzqGMx/RIuc 6PmbqsTJ5a3yzl71//M4UsymLk8ixrDRZnSa35+yBZO4a0xO5E5Q8cA2mRBc9cHj AzYFruyGoLNuiMeDZuEJqfj70/OvJGSRG6Jx1gmnVNU61XvoX7g= =6dfU -----END PGP SIGNATURE----- --0vzXIDBeUiKkjNJl--