Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnjHk-0005fB-BC for pgsql-admin@arkaria.postgresql.org; Wed, 17 Jul 2019 12:43:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hnjHi-0004le-Kn for pgsql-admin@arkaria.postgresql.org; Wed, 17 Jul 2019 12:43:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnjHi-0004lO-9O for pgsql-admin@lists.postgresql.org; Wed, 17 Jul 2019 12:43:50 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnjHg-0000rI-8K for pgsql-admin@postgresql.org; Wed, 17 Jul 2019 12:43:49 +0000 Received: by mail-qk1-x744.google.com with SMTP id s145so17322960qke.7 for ; Wed, 17 Jul 2019 05:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:date:subject:message-id :to; bh=HU2O4bmXrL0F+dMtbidBPWtfO5v2UccbyHnG/8tNN9I=; b=ObLQSaCUCqsrmRd8Xk2egDDIi3Rfspo8HkElzFjbJw+viTYgqM0UtuS+aOslg11OjZ C5O0FBvRPNOvwus0268JIQY+3SJninu+7HLezkqMyfBsMCxU6vtpa522WONh2q4wxVUp empCNpnv551vbMUMoTBBQmHyAFj5t4DW6J/CRC08ZU8qT+RqrfNaVK8JW7shUmT1phyW dH1di8+oMVwkgOelzqbnFk6CdPPYLDzHUKpqNJp0VnDCCSYO1BinVxvG+XDxHSYo2CXj DRiHajuDYv+M1291925oOYtEa1bomx+/nmJxXTorjT80t1zr00Vbw1AiVscS8rm4XyLc l8Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:to; bh=HU2O4bmXrL0F+dMtbidBPWtfO5v2UccbyHnG/8tNN9I=; b=UFjbPaIqNMs6Lj14SUOe1LTMgfya6sS+0jKCIgFlfOb0ebXh3mxN6cVHsEBaz95f1N 4FwI6sLUmULHim1uyzJ4ZsCbUY2jdHDN570SfdlySN7xV4BlTHyigDON2EmOv7slRBBX N87fLSxXpJw1gLTx73ycYklCiZc0EdgRoF124yZVkq8dodAm3RQ84htuamqm5Q403ols CI69yTbF35ROik7dOIRPrPHPDfyWoTZhiCjOsLDccBTJU0kTSbb8+zQiVv1iiMLMVXxR JKm9BsTB9iG3zSUpTgGKDsMN+ejNpCyrk+DLgMZ0ye0+2fLO7cqBcJs9gOfclWqHcYdC KhCg== X-Gm-Message-State: APjAAAVSUmcNP9wyMREnTkyHLllUHKOfLxbb3CLgTTNDut9ZuQxHSA8A 1JTOGsnYWbiLRy39wvnGs0R5quLB X-Google-Smtp-Source: APXvYqxnCFv0RqZVyhjTirZBL7o0yM15qMNT2wbRrUQUUjXbPnBwcJ9RXWOMYUDdU38ON8Y/b0gVVg== X-Received: by 2002:a37:2747:: with SMTP id n68mr24240151qkn.447.1563367425069; Wed, 17 Jul 2019 05:43:45 -0700 (PDT) Received: from ?IPv6:2600:1003:b02f:facd:e9da:7aa:c864:9b73? ([2600:1003:b02f:facd:e9da:7aa:c864:9b73]) by smtp.gmail.com with ESMTPSA id y2sm10894865qkj.8.2019.07.17.05.43.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jul 2019 05:43:44 -0700 (PDT) From: John Scalia Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Wed, 17 Jul 2019 08:43:43 -0400 Subject: pg_restore and the -C flag Message-Id: <4C9267A4-5A07-4FC0-B331-40EA95959534@gmail.com> To: pgsql-admin@postgresql.org X-Mailer: iPhone Mail (16F203) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi all, =46rom what I=E2=80=99m reading on www.postgresql.org, the -C option for pg_= restore is supposed to create the database before restoring into it, but her= e=E2=80=99s my command line:=20 pg_restore -p 5432 -C -d restored_db recovery.dmp The dmp file was created with pg_dump using=20 pg_dump -p 5432 -F c orig_db > recovery.dmp. Pg_restore errors saying the database does not exist. Yes, I know that port 5= 432 is the default, but not all of our databases are. So, do I have any opt= ions wrong with either utility? Or why is this happening? I=E2=80=99m just t= rying to document a recovery procedure and testing my documentation. =E2=80=94 Jay Sent from my iPhone=