From: | Ron <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: pg_restore 12 "permission denied for schema" errors |
Date: | 2022-10-23 04:23:21 |
Message-ID: | cb89e943-a8ce-f986-c719-50d0be8d5b72@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 10/22/22 17:06, Adrian Klaver wrote:
> On 10/22/22 14:45, Ron wrote:
>> On 10/22/22 16:29, Adrian Klaver wrote:
>
>>> To pseudo for me.
>>>
>>> What file exactly is:
>>>
>>> pg_restore --jobs=X --no-owner $NEWDB
>>>
>>> restoring?
>>>
>>> And how was that file created?
>>>
>>> Knowing this might help get at why the more straight forward method does
>>> not work.
>>
>> This is what I ran to restore the database:
>> export PGHOST=${RDSENV}.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com
>> cd /migrate/TASK001793786/2022-10-19b
>> NEWDB=sides
>> pg_restore -v --create --clean --no-owner --jobs=`nproc` -Fd
>> --dbname=template1 $NEWDB
>> psql $NEWDB -f all_OWNER.sql
>> psql $NEWDB -f all_GRANT.sql
>>
>> The name of the database is "sides", and there's a directorynamed "sides"
>> under /migrate/TASK001793786/2022-10-19b.
>
> Aah, I forgot about the -Fd, now it makes more sense.
>
> To get past the --jobs induced error required the addition of --no-owner
> and then adding owners and grants after the main restore.
>
> What was the pg_dump command that produced
> /migrate/TASK001793786/2022-10-19b/sides ?
PGHOST=mumble.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com
PGUSER=postgres
cd /migrate/TASK001793786/`date +%F`
DB=sides
pg_dump -d $DB -j4 -Z0 -v -Fd --file=$DB 2> ${DB}_pgdump.log
--
Angular momentum makes the world go 'round.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-10-23 04:36:32 | Re: pg_restore 12 "permission denied for schema" errors |
Previous Message | Adrian Klaver | 2022-10-22 22:06:43 | Re: pg_restore 12 "permission denied for schema" errors |