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 1nk6lS-00036W-0R for pgsql-general@arkaria.postgresql.org; Thu, 28 Apr 2022 16:13:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nk6lP-0003pU-Aj for pgsql-general@arkaria.postgresql.org; Thu, 28 Apr 2022 16:13:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nk6lN-0003nx-J3 for pgsql-general@lists.postgresql.org; Thu, 28 Apr 2022 16:13:07 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nk6lJ-0002pD-SO for pgsql-general@lists.postgresql.org; Thu, 28 Apr 2022 16:13:05 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 075DC32009A0; Thu, 28 Apr 2022 12:12:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 28 Apr 2022 12:12:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1651162377; x= 1651248777; bh=j3hDljpH1HyfpQO7mHWeVN36PhKfpoicAS9gdkX37kU=; b=l SxGtnDJOp7voAgd4oWpl0QXpsF5g1djJKpqdi2O5hFklVYivpsFMoq+CwkeOTUeL fUXy3q5YJEMB6qEW6i1FMjH50YWYddNg6/te2Cvm20XdD+oi3AYk9Dkr3FXNPtOj fse4yZDH4zPb3SuT7Gk7gu1SJRnf11FSUGBw4cF9hZhEh2St0R35ZDFogdgZrSug 9EHBGskKC1JiIOnLbORmSNA36C88+E46Yj0Xn8T2Sz1uXcw2RdUOq9pOntC1KhAo 3a2ZV6MzzJV3QofEDF/gPzNTq9vMBqGBgEWpwCqGkjBRJLX0NEy1O93Mw3oU2/jP gFENTqiU0TAWJaMcaePPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1651162377; x=1651248777; bh=j3hDljpH1Hyfp QO7mHWeVN36PhKfpoicAS9gdkX37kU=; b=tP9ReXAsC8ZtvsJfm7zRGWuGYNaL3 2AhnG6cXe30Qbh67URf1PGzqtZHuJuLlGYVdHT3Gq7vsyMrYv0aPNdIWlSRHo0j9 R4kQjcFqhcOPfgcYgO60QaoMg0aHuY6JcWH/TKRR795xED4qhJH3DYCTB5tiZ9ce p45Dzm1eHdoV1B6lnTeNGvN7oPRnTV0ffZY0USZmmBCO3B5O56TGOGVghuMOEtjJ X3FPpTym5M9u9xg5+lSmfgThLGIdiOLab0l0HQCLetSBM3bD4M0Xwkd/5LQUs7+Z YezF5NFGXUkPI84xUQdQg7fznnN5IsIA+X123wkWRixor33DWHVbyUZ9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejgddutddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhephedugfethfettdehieevteeukedtjedvhfevkefg udefgeevteduvdeuvdeggeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 28 Apr 2022 12:12:56 -0400 (EDT) Message-ID: <6a59a991-672b-19fc-3e25-286f83cd519e@aklaver.com> Date: Thu, 28 Apr 2022 09:12:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: Backing up a DB excluding certain tables Content-Language: en-US To: JORGE MALDONADO Cc: Tom Lane , pgsql-general@lists.postgresql.org References: <252494.1650998593@sss.pgh.pa.us> <282742.1651016166@sss.pgh.pa.us> <1db41c48-0738-dabd-5155-52c7ce1a19de@aklaver.com> From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/28/22 09:57, JORGE MALDONADO wrote: > Good day, > > Here is the output to commands suggested by *Adrian Klaver*. Encoding is > the same in both client and server. Also, there are 7 tables I want to > exclude. > image.png > The version of source DB is 11, and target version is 14. > > Regarding the following comment: > > *FYI, -n riopoderoso and the riopoderoso in > 'riopoderoso."AspNetRoleClaims"' are redundant.* > > > Should I remove the schema name so the exclude switch is *-T "AspNet"* > instead of *-T 'riopoderoso."AspNet"'?* As Tom Lane pointed out earlier -n riopoderoso is going to restrict the dump to objects in the riopoderoso schema so schema qualifying the table name is not needed. > > I have tried -T 'riopoderoso."Asp*"',  -T 'riopoderoso."Asp"*', -T > '"Asp"*', -T "Asp"*' and several other combinations unsuccessfully. > Also, I have escaped double quotes, single quotes and both at the same > time using the *^* character as documented in several sources. I don't use Windows much anymore and not all for Postgres so I can't comment on this. Someone who does will need to offer guidance. > Can I run the *pg_dump* command in *psql*? I rarely use psql. No you can't run pg_dump in psql. Speaking of psql, what happens when you log in with it? Do you get a code page warning? > > Regards, > Jorge Maldonado > -- Adrian Klaver adrian.klaver@aklaver.com