NetBackup Snapshot Manager 10.3.x or higher upgrade may fail if NetBackup Snapshot Manager was previously CloudPoint 2.x.

Article: 100064226
Last Published: 2024-03-15
Ratings: 0 0
Product(s): CloudPoint

Problem

If the environment was CloudPoint 2.x in the past, then upgrading to NetBackup Snapshot Manager 10.3.x or higher may fail during the DB migration phase due to old references of "cp_snap" in the asset collection.

Error Message

Error during the installation:
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.

Error in flexsnap.log:
flexsnap-dbmigrate: "Mar 11 19:53:41 c96e18ec9b90 flexsnap-client[7] MainThread flexsnap.database.data_migration: INFO - Starting index creation and data migration for flexsnap DB"
flexsnap-mongodb: "2024-03-11T19:53:41.924+0000 I COMMAND  [conn3] command flexsnap.asset command: aggregate { aggregate: ""asset"", pipeline: [ { $match: {} }, { $group: { _id: 1, n: { $sum: 1 } } } ], cursor: {}, lsid: { id: UUID(""6axxxxe2-01f5-4da4-ab9a-dxxxxxx6a48"") }, $db: ""flexsnap"", $readPreference: { mode: ""primaryPreferred"" } } planSummary: COLLSCAN keysExamined:0 docsExamined:37820 cursorExhausted:1 numYields:295 nreturned:1 reslen:127 locks:{ Global: { acquireCount: { r: 297 } }, Database: { acquireCount: { r: 297 } }, Collection: { acquireCount: { r: 297 } } } storage:{ data: { bytesRead: 224956075, timeReadingMicros: 190800 } } protocol:op_msg 213ms"
flexsnap-postgresql: "2024-03-11 15:53:41.930 EDT [68] ERROR:  column ""cp_snap"" of relation ""asset"" does not exist at character 66"

flexsnap-dbmigrate: "Mar 11 19:53:41 c96e18ec9b90 flexsnap-client[7] MainThread flexsnap.database.data_migration: ERROR - DB Migration: Encountered operation failure error: column ""cp_snap"" of relation ""asset"" does not exist"

Cause

Because the system was previous CloudPoint 2.x and upgraded over time to newer version of CloudPoint and NetBackup Snapshot Manager.  Some old references caused a problem with the database migration.

Solution

This issue can be seen on any system that was upgraded from CloudPoint 2.x. However, it is possible to confirm if the system is susceptible by running:

PODMAN: $ podman exec -it flexsnap-mongodb mongoexport --port 27017 --collection=asset --db=flexsnap --ssl --sslCAFile /cloudpoint/keys/cacert.pem --sslPEMKeyFile /cloudpoint/keys/mongodb.pem --sslAllowInvalidHostnames | grep cp_snap | wc -l
DOCKER: $ docker exec -it flexsnap-mongodb mongoexport --port 27017 --collection=asset --db=flexsnap --ssl --sslCAFile /cloudpoint/keys/cacert.pem --sslPEMKeyFile /cloudpoint/keys/mongodb.pem --sslAllowInvalidHostnames | grep cp_snap | wc -l

If the above returns a positive number, then you will see this issue during upgrading.

NOTE : Take backup of /cloudpoint prior to making the change.

To address this issue prior to upgrading, do the following:
PODMAN: # podman exec -it flexsnap-mongodb mongo --ssl --sslCAFile /cloudpoint/keys/cacert.pem --sslPEMKeyFile /cloudpoint/keys/mongodb.pem --sslAllowInvalidHostnames --eval 'db.asset.updateMany({},{ $unset: {cp_snap:""} })' flexsnap
DOCKER: # docker exec -it flexsnap-mongodb mongo --ssl --sslCAFile /cloudpoint/keys/cacert.pem --sslPEMKeyFile /cloudpoint/keys/mongodb.pem --sslAllowInvalidHostnames --eval 'db.asset.updateMany({},{ $unset: {cp_snap:""} })' flexsnap

 

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

References

Etrack : 4157343

Was this content helpful?