Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g06Iz-00013R-Uh for pgsql-general@arkaria.postgresql.org; Wed, 12 Sep 2018 14:39:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g06Ix-0005vn-Pg for pgsql-general@arkaria.postgresql.org; Wed, 12 Sep 2018 14:39:43 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1g06Ix-0005vg-I1 for pgsql-general@lists.postgresql.org; Wed, 12 Sep 2018 14:39:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g06Iu-0004Yr-Je for pgsql-general@lists.postgresql.org; Wed, 12 Sep 2018 14:39:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w8CEdZrj003003; Wed, 12 Sep 2018 10:39:35 -0400 From: Tom Lane To: Scot Kreienkamp cc: "pgsql-general@lists.postgresql.org" Subject: Re: PG9.1 migration to PG9.6, dump/restore issues In-reply-to: <17082AAFC33A934082836458CB53494374C993BD@MONDB03.na.lzb.hq> References: <17082AAFC33A934082836458CB53494374C993BD@MONDB03.na.lzb.hq> Comments: In-reply-to Scot Kreienkamp message dated "Wed, 12 Sep 2018 13:55:15 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3001.1536763175.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 12 Sep 2018 10:39:35 -0400 Message-ID: <3002.1536763175@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Scot Kreienkamp writes: > Restore completes successfully, but I noticed that the schema > permissions are missing, possibly others as well (Is this a known > issue?). If you're talking about custom modifications you made to the permissions of the "public" schema in particular, then yeah, that won't be tracked (IIRC, it will be with newer source server versions, but not 9.1). Otherwise, no, that's not expected. Would you provide more detail? > These are the commands I'm using now: > pg_dump -sh $OLDSERVER $DATABASE -f $BACKUPPATH/$DATABASE.schema.sql > pg_dump -vj 4 -F d -h $OLDSERVER $DATABASE -f $BACKUPPATH/DATABASE --no= -synchronized-snapshots > createdb $DATABASE > psql -d $DATABASE -f $BACKUPPATH/$DATABASE.schema.sql > pg_restore -evj 4 -d $DATABASE $BACKUPPATH/$DATABASE -a --disable-tri= ggers Also note that this recipe does not copy "global" objects (users and tablespaces), nor does it restore any database-level properties. You'd need to use pg_dumpall to transfer those things automatically. (Possibly "pg_dumpall -g" would be a good starting point here.) regards, tom lane