Skip to main content

 Hi,

 

We are trying to restore a single DB (Out of place) using DumpBasedBackupSet, but it fails with the below error:

 

Source:

Postgres version : 10.17

OS: CentOS stream 8

 

Destine:

Postgres version : 14.11

OS: CentOS stream 9

 

 

 

 

Job log:

=============================================================================

4072164 3e2328 03/25 19:25:17 21322972 PostgresRestore::OnBufferPlFsHdr() - fifoname = /opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/testingdb
4072164 3e232f 03/25 19:25:17 21322972 PostgresRestore::applyPostGres() - Enter
4072164 3e232f 03/25 19:25:17 21322972 PGCommon::GetPGLibraryPath(1479) - Couldn't find library [/usr/pgsql-14/lib/libpq.so] , try to locate libpq.so.x version under library path.
4072164 3e232f 03/25 19:25:17 21322972 PGCommon::GetPGLibraryPath(1492) - found match libpq.so.5]
4072164 3e232f 03/25 19:25:17 21322972 LoadlibpqSymbols() - Loading libpq Library...
4072164 3e232f 03/25 19:25:17 21322972 ConnectDb() - Connection Info string: port = '5432' dbname = 'postgres' user = 'sqldba' password = ********
4072164 3e232f 03/25 19:25:17 21322972 PostgresRestore::applyPostGres() - col.size() = 2
4072164 3e232f 03/25 19:25:17 21322972 PostgresRestore::applyPostGres() - database = datnameatestingdb] datallowconn t] datistemplatedf], i = l1], col.size() = 2
4072164 3e232f 03/25 19:25:17 21322972 PostgresRestore::applyPostGres() - This database htestingdb] does exists, so lets delete the database
4072164 3e232f 03/25 19:25:17 21322972 PostgresRestore::DropDatabase(3288) - Command 8drop database "testingdb"]
4072164 3e232f 03/25 19:25:17 21322972 PGCommon::GetPGLibraryPath(1479) - Couldn't find library [/usr/pgsql-14/lib/libpq.so] , try to locate libpq.so.x version under library path.
4072164 3e232f 03/25 19:25:17 21322972 PGCommon::GetPGLibraryPath(1492) - found match libpq.so.5]
4072164 3e232f 03/25 19:25:17 21322972 LoadlibpqSymbols() - libpq Library is already Loaded
4072164 3e232f 03/25 19:25:17 21322972 ConnectDb() - Connection Info string: port = '5432' dbname = 'postgres' user = 'sqldba' password = ********
4072164 3e232f 03/25 19:25:17 21322972 PostgresRestore::applyPostGres() - Dropped database ptestingdb]
4072164 3e232f 03/25 19:25:17 21322972 PGCommon::RunUnixCommandErrorOutputInFile() - Command = /usr/pgsql-14/bin/pg_restore  -C -v -U sqldba -Fc --port=5432 --dbname="postgres" < "/opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/testingdb"
4072164 3e232f 03/25 19:25:17 21322972 PGCommon::RunUnixCommandErrorOutputInFile() - Output in file [/opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/pg_restore_21322972_4072164]
4072164 3e232f 03/25 19:25:17 21322972 CvProcess::system() - /usr/pgsql-14/bin/pg_restore  -C -v -U sqldba -Fc --port=5432 --dbname="postgres" < "/opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/testingdb" 2>> /opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/pg_restore_21322972_4072164
4072164 3e2328 03/25 19:25:18 21322972 PostgresRestore::OnBufferPlFsHdr() - Process ready to receive Input
4072164 3e2328 03/25 19:25:44 21322972 writebytes() - write failed errno = f32]
4072164 3e2328 03/25 19:25:44 21322972 PostgresRestore::OnBufferPlData() - writebytes failed, bytes written = -1, bytes need to written = 45056
4072164 3e2328 03/25 19:25:44 21322972 PostgresRestore::FailTheJob() - Failing the Job
4072164 3e2328 03/25 19:25:44 21322972 Sending FAILED complete message to JM, 21322972
4072164 3e232f 03/25 19:25:44 21322972 CvProcess::system() - Command completed with rc=137
4072164 3e232f 03/25 19:25:44 21322972 PGCommon::RunUnixCommandErrorOutputInFile() - /usr/pgsql-14/bin/pg_restore  -C -v -U sqldba -Fc --port=5432 --dbname="postgres" < "/opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/testingdb" 2>> /opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/pg_restore_21322972_4072164 137 
4072164 3e232f 03/25 19:25:44 21322972 PGCommon::RunUnixCommandErrorOutputInFile() - Unable to read from file [/opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/pg_restore_21322972_4072164].Error 20x800710D2:{CQiFile::ReadWholeFile(1277)/W32.4306.(The library, drive, or media pool is empty. (ERROR_EMPTY.4306))-FileSize is <= 0}]
4072164 3e232f 03/25 19:25:44 21322972 PostgresRestore::applyPostGres() - [/usr/pgsql-14/bin/pg_restore  -C -v -U sqldba -Fc --port=5432 --dbname="postgres" < "/opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/21322972/testingdb"] pump the data, rett = -1
4072164 3e232f 03/25 19:25:44 21322972 PostgresRestore::applyPostGres() - system failed out =  err = 

=============================================================================

Thanks,

Hello @Mike_M 

Thanks for the great question!
The following goes over the steps to perform this restore: 
https://documentation.commvault.com/11.20/restoring_one_or_more_postgresql_databases.html

Just confirming the following steps were taken before you are attempting the restore?
 

  1. For DumpBased backup set, complete the following steps:

    • Roles and tablespaces to which the database or table belongs should preexist.

    • We connect to maintenance database to perform the restore operation. Hence, restore of maintenance database requires modifying the maintenance database in the Instance details page to another database that will not be a part of the restore job.


Kind regards

Albert Williams


Reply