NetBackup Snapshot Manager 10.3.x or higher upgrade fails during DB Migration due to Cloudpoint 2.x data in the database.

Article: 100070651
Last Published: 2024-08-29
Ratings: 0 0
Product(s): NetBackup & Alta Data Protection

Problem

NetBackup Snapshot Manager 10.3.x or higher upgrade fails during DB Migration due to Cloudpoint 2.x data in the database.

Error Message

Error during the upgrade:

Starting container: flexsnap-postgresql ...done
Waiting for flexsnap-postgresql container to move to healthy state...Starting container: flexsnap-mongodb ...done
Waiting for flexsnap-mongodb container to move to healthy state...Data migration required from mongo database to postgresql database
Data migration is failed.
For more information, refer to the /cloudpoint/logs/flexsnap.log file.

flexsnap-cloudpoint.log:

Aug 23 10:17:29 d7627af98251 flexsnap-client[9] MainThread flexsnap.database.data_migration: ERROR - DB Migration: Encountered operation failure error: column 
"firstName" of relation "user" does not exist
LINE 2: ...NSERT INTO "user" ("_id",  "email",  "password",  "firstName...
                                                             ^
Traceback (most recent call last):
  File "/opt/VRTScloudpoint/lib/flexsnap/database/postgresql/operations.py", line 68, in _func
    result = func(self, *args, **kwargs)
  File "/opt/VRTScloudpoint/lib/flexsnap/database/postgresql/operations.py", line 138, in insert
    cursor.execute(sql, data)
  File "/usr/local/lib64/python3.9/site-packages/psycopg2/extras.py", line 236, in execute
    return super().execute(query, vars)
psycopg2.errors.UndefinedColumn: column "firstName" of relation "user" does not exist
LINE 2: ...NSERT INTO "user" ("_id",  "email",  "password",  "firstName...

Cause

The issue occurs if the system previously had CloudPoint 2.x and is upgraded over time to a newer version of CloudPoint and NetBackup Snapshot Manager.  Some old references cause a problem with the database migration as those references are no longer used in 10.3 and higher versions.

Solution

Note: Before running the commands below, make sure the system is recovered to the version from which the upgrade was attempted. Also create a tar of /cloudpoint.

Docker:

docker exec -it flexsnap-mongodb mongo --ssl --sslCAFile /cloudpoint/keys/cacert.pem --sslPEMKeyFile /cloudpoint/keys/mongodb.pem --sslAllowInvalidHostnames -eval 'db.user.updateMany({},{ $unset: {lastName:""} })' identity_manager_service

docker exec -it flexsnap-mongodb mongo --ssl --sslCAFile /cloudpoint/keys/cacert.pem --sslPEMKeyFile /cloudpoint/keys/mongodb.pem --sslAllowInvalidHostnames -eval 'db.user.updateMany({},{ $unset: {firstName:""} })' identity_manager_service

 

Podman:

podman exec -it flexsnap-mongodb mongo --ssl --sslCAFile /cloudpoint/keys/cacert.pem --sslPEMKeyFile /cloudpoint/keys/mongodb.pem --sslAllowInvalidHostnames -eval 'db.user.updateMany({},{ $unset: {lastName:""} })' identity_manager_service

podman exec -it flexsnap-mongodb mongo --ssl --sslCAFile /cloudpoint/keys/cacert.pem --sslPEMKeyFile /cloudpoint/keys/mongodb.pem --sslAllowInvalidHostnames -eval 'db.user.updateMany({},{ $unset: {firstName:""} })' identity_manager_service

 

NOTE: If the system was originally on CloudPoint 2.x and underwent subsequent upgrades, please review the relevant article section to ensure that any potential issues related to these legacy versions are addressed and mitigated during the upgrade process.

References

Etrack : 4177025

Was this content helpful?