restoring PostgreSQL database after creating target database
Below code for restoring the database backup works when I run after manually creating the database_restore in postgresql. I want to use the -C option to create the target database. i.e. dumper = “”” “C:Program FilesPostgreSQL14binpg_restore” -h %s -p %s -U %s -C -d %s -v -F t %s “”” instead. But this gives error. Any directions will be helpful.
pg_restore completes without any errors but data not loaded –Data Only –Dump file
In source the table1 has 4k records