Rico
Rico

Reputation: 1

pg_restore through .bat on pgAdmin4

I am reaching out to seek assistance with an issue I've encountered while transitioning from PostgreSQL 9.4 to PostgreSQL 16. The primary reason for this upgrade was the discontinuation of PostGIS support in version 9.4. Although the database was previously hosted on pgAdmin III, I am now attempting to restore it on pgAdmin4. Despite receiving an exit code 0, which typically indicates a successful operation, the table restoration process does not seem to be executing as expected.

I have followed the standard procedures for database restoration, yet the issue persists. I suspect there might be compatibility issues or additional steps required when migrating between these specific versions of PostgreSQL and pgAdmin.

I've encountered an issue while attempting to restore a database using a .batch file in pgAdmin, which previously worked without any problems in pgAdmin III. The process now exits with code 0, indicating an unsuccessful restore.

cd/D C:\Program Files\PostgreSQL\16\bin\
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE_POLYGONS% 2>%FE_POLYGONS_LOG%
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %SURVEYSTATUS% 2>%SURVEY_STATUS_LOG%
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE2_METER_MITIGATION_DATA% 2>%FE2_METER_MITIGATION_LOG%
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE_NETWORK_DATA% 2>%FE_NETWORK_DATA_LOG% 
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE2_METER% 2>%FE2_METER_LOG% 
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE_STYLES_DATA% 2>%FE_STYLES_DATA_LOG% 
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE_NODE_DATA% 2>%FE_NODE_DATA_LOG% 
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE2_METER_HISTORICAL_DATA% 2>%FE2_METER_HISTORICAL_DATA_LOG% 
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE_METER_DEMAND_DATA% 2>%FE_METER_DEMAND_DATA_LOG% 
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %FE_METER_IN_OR_OUT_DATA% 2>%FE_METER_IN_OR_OUT_DATA_LOG% 
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %RE_INSTALL_DATA% 2>%RE_INSTALL_DATA_LOG%
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %RE_PERFORMANCE_DATA% 2>%RE_PERFORMANCE_DATA_LOG%
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %CGR_INSTALL_DATA% 2>%CGR_INSTALL_DATA_LOG%
pg_restore -h localhost -p 5432 -U postgres -w --dbname FE_SMI_NJ --verbose %CGR_PERFORMANCE_DATA% 2>%CGR_PERFORMANCE_DATA_LOG%

this is in the LOG pg_restore:

error: could not open input file "C:\NEW_JERSEY\POD\BACKUPS_NJ\fe_polygons_.backup": No such file or directory

Upvotes: 0

Views: 27

Answers (0)

Related Questions