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 1jv4BY-000708-6Y for pgsql-general@arkaria.postgresql.org; Mon, 13 Jul 2020 19:32:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jv4BX-0007ZT-5S for pgsql-general@arkaria.postgresql.org; Mon, 13 Jul 2020 19:32:19 +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 1jv4BV-0007ZF-JT for pgsql-general@lists.postgresql.org; Mon, 13 Jul 2020 19:32:18 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jv4BS-0005gE-Rn for pgsql-general@postgresql.org; Mon, 13 Jul 2020 19:32:16 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 128DB7AB; Mon, 13 Jul 2020 15:32:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 13 Jul 2020 15:32:13 -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=T 40G3aoYkDj6nnqqOShFdJ3X19esHuIMc+ncAZ+qyiA=; b=cK/YixYOZ9RysfGHo uQLXEs6FN+6EfyBKyTDt3ciqwHC3hW8wur8yPApPLjDfA7OJoLDibiw1xkLszyW2 Z3gj1kpvGu18fgk3b1YS2YC6JZd3kkeb69F8bGxye7vFi+rEFDT0wy7HEQQHKfco /1KmRCkScb+CXabCERq5FmDzagBGSB0pxC1EFNdTNIAJWE/z/kqaBF+DclM4xq6M iaxlRdn3o6Dga3LInxr+lVK1VgAmoqpR/PxAAwPJUOQ+CtKyT77DyDrolUtqYM3u zkrBTkABJuvmJl+u/PnBcUtjwD/xoMwgjQ7eQpd9e68rhRwYGLD7E6B4VMWn72GB yKtrg== 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=T40G3aoYkDj6nnqqOShFdJ3X19esHuIMc+ncAZ+qy iA=; b=P8AA+o6NMIne2iuHao9RDcPi/Yh8zOtU8hr0tVgbWxQYxWUafHnxpmsR3 sl/FmlMJNLcU/QXqxdcmWWtAmO5xUJKT80ZLKtd36x/kJE6/vMU5D7d6b1zNXROr aHMYy88UgwWHsYpTjb1J5PL6MBghn1nG9gKO3fzhqY1belBq218RqEroYwGGxm82 KTPgDWl5ft0+c0uK2eunsQh3xAvtU5bDGdQqAPGhK/SI5RiIGFTxDlz2aSASxkbe 3eTtw4PNzap3E2tdo4ZM+gS46t9tRaMoTaJgNez1hUe3kKc+zp7GilGkPdUwVqbf 2k9tq2Vpbr66bKZtxZf4v+mq8cF8w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrvdekgddugeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeehnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepvdekhfehhf elkeejueeuleehvdegjeefheelffethfdtfefffeegteffgfehfeffnecukfhppeejhedr udejvddrhedrvdefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm 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 6C1A93280064; Mon, 13 Jul 2020 15:32:11 -0400 (EDT) Subject: Re: backup -restore question To: Julie Nishimura , pgsql-general , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: <97dbd799-7a6c-d0bc-deb2-fd56d3cda7a9@aklaver.com> Date: Mon, 13 Jul 2020 12:32:10 -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=windows-1252; 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/13/20 12:12 PM, Julie Nishimura wrote: > Hello there, > One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file > with the compression 9 "pg_dump -Z 9". What is the right format of > restore this file when needed? Can I run the restore from a compressed > file or I need to unzip the file first, then run pg_restore? Thanks It depends on whether you dumped using the custom format -Fc or plain(no -F or -Fp). If the custom format then you run pg_restore against it. If the plain format then you will to unzip first then feed the file to psql. -- Adrian Klaver adrian.klaver@aklaver.com