Dump & restore in directory format and permissions are largely lost?

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Dump & restore in directory format and permissions are largely lost?
Date: 2021-06-16 00:54:37
Message-ID: CAOC+FBUk6FGOa0NGaFKX_jJTmOgN-xLTWFKm5MsdnDRqoQ9p-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Source and target are 13.2. Source dump command:

time pg_dump \
--verbose \
--dbname=boxscore \
--blobs \
--jobs=${JOBS} \
--format=directory \
--file=db.full.dump > ~/db.full.dump.log 2>&1

Restore excludes mat views, so two steps:

time pg_restore \
--list \
--format=directory \
db.full.dump | sed '/MATERIALIZED VIEW DATA/d' > restore.lst

And then

time pg_restore \
--verbose \
--host=${HOST} \
--user=postgres \
--format=directory \
--use-list restore.lst \
--dbname=boxscore \
--jobs 16 \
db.full.dump > ~/restore.log 2>&1

After creation, none of my schemes or relations really have the right
permissions, they seem totally absent. The same exact roles exist in source
and target.

Am I missing something obvious here?

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2021-06-16 00:57:42 Re: Dump & restore in directory format and permissions are largely lost?
Previous Message Ron 2021-06-15 20:52:41 Re: vacuumdb idle processes