Here is my update.
I was using pg_restore with -t 'schema-name.tablename'.
After reading the document, https://www.postgresql.org/docs/16/app-pgrestore.html, I tried to avoid using the clause of -t in pg-restore command. I just restored the entire
which has just 1 table dump.
In my opinion if there is any issue with -t clause in pg_restore, it should through an error instead of it is simply coming out without throwing any error.
Thanks,
Sarwar
From: Ron <ronljohnsonjr@xxxxxxxxx>
Sent: Tuesday, October 24, 2023 1:56 PM To: pgsql-admin@xxxxxxxxxxxxxxxxxxxx <pgsql-admin@xxxxxxxxxxxxxxxxxxxx> Subject: Re: pg_restore is not working On 10/24/23 12:24, M Sarwar wrote:
This works for me. I just tested it. You'll have to convert from bash to Windows. SrcHost=somehost DescHost=anotherhost SrcDir=/var/lib/pgsql/backups/test SrcDB=somedb DestDB=anotherdb Tbl=public.job pg_dump --host=$SrcHost -Fc -t $Tbl -v -d ${SrcDB} -f $SrcDir/${Tbl}.dump pg_restore --host=$DestHost -v -d ${DestDB} ${SrcDir}/${Tbl}.dump
--
Born in Arizona, moved to Babylonia. |