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 1t1Agv-00F24V-IQ for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2024 20:32:21 +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 1t1Agt-009tWn-Gq for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2024 20:32:19 +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 1t1Ags-009tWe-0Q for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2024 20:32:19 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1Agp-001F0E-9r for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2024 20:32:17 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id C6E0B1380244; Wed, 16 Oct 2024 16:32:13 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 16 Oct 2024 16:32:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1729110733; x=1729197133; bh=mGYOwOK7/wy0WxkEwSDryVt/phnkSPgt1uQAN1KYPFU=; b= u2wzoXiJUvGfB3qh/uJSsn9vNUxmi6gUOgBnv4R0zrjlgbzjbws/ppU/Ma3Z/pZ9 7FNuVgXXOBth9MMOEeA6QpcxjR+S4lpXXE6k7QcxbQq7oTC9aK8gPNlgrWxLhZ1a MVRdrVonODsU5O02YuNUWoYrgqFpaa0Oiv9nFWg4stzgKfwjqRTIz80OsUZ8yGzg PhYcHI+2x5fUagC67LhR2+R4bkp2YkOfSFHqmgqDMM3XI4Z1FeiIzaUaXaJWKUv5 o/BFmLDpwHzOb/6UBVVlmoFXd/cy1+so4VfDUuNCHSHmMyds8VQ8TAPPDviJSrOK i9+i07/Btvq9lmlZ4qxWxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1729110733; x= 1729197133; bh=mGYOwOK7/wy0WxkEwSDryVt/phnkSPgt1uQAN1KYPFU=; b=d LD/RehPa6sSwHrnF7YnLSFCtIshapjMEDM8d91fmifby2VPeo4EX3lwcHMB5XB/9 mbeayVaIJKQ8DT5BdcTLf9zOIQ9y6mAAzEGP0Rf+UtwZqM5bCcVETA/65xA4p6oI K9YVQ90CMyL7FQ+rjIDKqgGZK6dINHD9d+AftnPrAYJQn6MOCnNLOgA8+PM5IHGa ExmwNs0FRCI2wkba1RVbwyTi8UAL39nv48G1agg/BbpcpqHHuBRDJsa2HFQRN7oU Rh+HOaiDzl0xKdioNgLi6Blr9ynNzZUbHyhuC4CGrmEFluc/Rz9i5BXt+UDcS5N4 GqUAsNX8+sbf6mzx7g34Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdegledgudehudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepkeefheduvdejiefgieef jedtudduffelvdefleehfedtieffuefgvdekleegtddvnecuffhomhgrihhnpehpohhsth hgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsg gprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehtohhmrghs sehvohhnughrrgdrmhgvpdhrtghpthhtohephhgrrhhtmhgrnheitdhhohhmvgesghhmrg hilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhp ohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 16 Oct 2024 16:32:12 -0400 (EDT) Message-ID: <6f6ecffb-b4ab-41cc-9590-9e02dde0acae@aklaver.com> Date: Wed, 16 Oct 2024 13:32:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Backup To: Tomas Vondra , Andy Hartman , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/16/24 12:52, Tomas Vondra wrote: > On 10/16/24 21:37, Andy Hartman wrote: >> I am very new to Postgres and have always worked in the mssql world. I'm > You didn't specify the Postgres version - that matters, because older > pg_dump versions (before PG 16) do not support compression. Since PG 16 > you can use either -Fc or -Fd (instead of the tar format), and it'll > compress the output using gzip. Oh, it goes back further then that: https://www.postgresql.org/docs/7.1/app-pgdump.html "-F format, --format=format Format can be one of the following: p output a plain text SQL script file (default) t output a tar archive suitable for input into pg_restore. Using this archive format allows reordering and/or exclusion of schema elements at the time the database is restored. It is also possible to limit which data is reloaded at restore time. c output a custom archive suitable for input into pg_restore. This is the most flexible format in that it allows reordering of data load as well as schema elements. This format is also compressed by default. " > > Alternatively, you can use --compress=method:level (the supported > methods depend on how the packages were built, no idea what platform > you're on etc.). See > > https://www.postgresql.org/docs/current/app-pgdump.html > > If you're on older version, you should be able to write the dump to > standard output, and compress that way. Something like > > pg_dump -Fc | gzip -c > compressed.dump.gz > > However, be aware that pg_dump is more an export tool than a backup > suitable for large databases / quick recovery. It won't allow doing PITR > and similar stuff. > > > regards > -- Adrian Klaver adrian.klaver@aklaver.com