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 1jwWoF-0001jB-7G for pgsql-general@arkaria.postgresql.org; Fri, 17 Jul 2020 20:18:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jwWoD-0000kn-Ok for pgsql-general@arkaria.postgresql.org; Fri, 17 Jul 2020 20:18:17 +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 1jwWoB-0000kY-Nz for pgsql-general@lists.postgresql.org; Fri, 17 Jul 2020 20:18:17 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwWo8-0006bQ-P2 for pgsql-general@postgresql.org; Fri, 17 Jul 2020 20:18:14 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7C8EF5C00C4; Fri, 17 Jul 2020 16:18:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 17 Jul 2020 16:18:11 -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=fm3; bh=2 HuJ335FQ5X0KS47wuHZaQ9Ei25k/DW4LXYpbpq2aBQ=; b=xHng8m0RC8kU212/H U51cu/4QbOnilB5P9N/mrOMnH61krCPiXI5Tpxj67Zc6fWmoBiqUM88yiMqdbRCa BZi7FLcFzDgWT99QraIYHw+frbNmPlcTaku632lFvnzfgW3RCToaLzBIgTWNjUAB Yf7VG2tag8+EiSpOFxcotg7ghWBP42Ox/wZxyrZwAhBzjozpEeG+LRVyEOdn5Myk RH4WWljDd+21+vZJmyv2ucUEl4KALD6hvVg7TZke7qvPeUlJL7ULlfuRcBgYZvqT pOhhfWkRMpV8ROA868vqZHu89P3GzNxrcjuO8BX/aAqpo9OGhD9nwkYxGwkf0Aoq VEfew== 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=fm3; bh=2HuJ335FQ5X0KS47wuHZaQ9Ei25k/DW4LXYpbpq2a BQ=; b=mVLuCq97exWcz5NZTd+p44Mv1LBqQov7yk5qAtJJdUYFQ+jr3aJnjbaRO TLmFaM04sOBrURxCpoKey5jABvjFOcDIC/BipRZxfIlim3Xb2zHjbm//28LeI+no M2ivKg4xNHcXksSn48kcAlhsBW7GQFo2z9OY1+lUB8MitjGrIRTb+/IBHGP6ayNm JcZRzdtjq+QtVOKHpvoHxHBygV4EVzUWfTfLIr7rIR8JPVdc/PpbfsZBkn5qid+a UpWHMLRs3CEYzO8i3fepNzgsFh28Ox3ZZdzV6mKuBzsNEjOEBAQBdCVmauxc9AUR 2Nf6AL0yeHNJK9H4ICzX2/7gtHigg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrfeejgdehjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepveevfeevfeeugeffkeekhfegieeufffgteeujedvgffh ueejjefhkeejleegtdegnecukfhppeejhedrudejvddrhedrvdefudenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghv vghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 9EFC93280063; Fri, 17 Jul 2020 16:18:10 -0400 (EDT) Subject: Re: About compress in pg_dump To: Edmundo Robles , pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: <80c81630-6e09-6ff4-be3d-66697d667f39@aklaver.com> Date: Fri, 17 Jul 2020 13:18:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/17/20 7:48 AM, Edmundo Robles wrote: > To backup  a database  I do: >  nice -n +19  pg_dump -Fc  database | nice -n +19 gzip --rsyncable > -nc >  database.dump > > If -Fc  option  is compressed  by default  I dont need gzip the backup, > but I need pass --rsyncable  and -n options. > > How can  I pass  gzip options  to compress in pg_dump? > > if not   I will use : > nice -n +19  pg_dump -Fc -Z 0 database | nice -n +19 gzip --rsyncable > -nc >  database.dump > but I dont want to do that. :) Do you need the custom format on the other end? Or can you just use the plain format dump and pipe that to gzip with appropriate options? You will then need to use psql to do the restore though. > > Thanks   for your help... > > -- > -- Adrian Klaver adrian.klaver@aklaver.com