For Minor Version changes (e.g., 8.7 → 8.8), typically yes, as long as the database schema hasn't changed significantly. For Major Version Changes (e.g., 7.6 → 8.x), direct restore will likely fail due to major schema and structural changes.
Here are step by step process of backup and restore process which you can run and test on your version:
Option1:
Backup Process:
Step 1:
OpenShift login command:
oc login --token=xyz --server=https://api..com:6443
Step 2:
If you have docker or Rancher installed, run below command
docker run -it --rm --pull always -v C:\Users\user1\Desktop\DB_Backup:/scripts --name ibmmas quay.io/ibmmas/cli:latest
Step 3:
Connect to the Pod from command line, Make sure your pod name is reflecting correct from opemshift console
oc exec -it -n db2u c-db2wh-manage-db2u-0 -- bash
Step4:
su - db2inst1
mkdir /mnt/blumeta0/home/db2inst1/db_backup/ (This directory can be any thing , it shoulld can be put into any directory on the cluster that is shared by the container nodes and has sufficient space to hold the backups.)
Step 5:
Follow all the steps and replace ${DBNAME} with you DB name like BLUDB for example.
https://www.ibm.com/docs/en/db2/11.5?topic=database-backing-up-db2-offline
Restore Process:
Step1:
Follow all the steps and replace ${DBNAME} with you DB name like BLUDB for example.
https://www.ibm.com/docs/en/db2/11.5?topic=backup-restoring-db2-by-using-commands
Step 2:
Last but not least, delete (i.e restart) manage pods to make sure backup data is reflected back.
I am attaching restore logs for your references
---------------------------------------------------------------------
Option 2:
Other way to take back up and restore is through ansible playbook which you can run via MAS CLI. Here is the documentation. This sometime may not work if backend code is broken so better to rely on above documentation.
https://ibm-mas.github.io/ansible-devops/playbooks/backup-restore/
Sample variables can be found here:
export MASBR_ACTION=restore
export MASBR_STORAGE_LOCAL_FOLDER=/scripts/backups/
export MASBR_RESTORE_FROM_VERSION=20250213225248
export MASBR_RESTORE_OVERWRITE=overwrite
export DB2_INSTANCE_NAME=db2mas
export MAS_APP_ID=manage
export MAS_INSTANCE_ID=masdemo
export MAS_WORKSPACE_ID=maslocal
ansible-playbook ibm.mas_devops.br_db2
you can find MAS_INSTANCE_ID and MAS_WORKSPACE_ID by going to ManageWorkspace under CustomResourceDefinitions sectopm in Openshift and go to yaml file. It will look something like this:
------------------------------
Avinash Kumar
------------------------------
Original Message:
Sent: Fri February 14, 2025 04:12 AM
From: Chandan Singh
Subject: Importing MX7.6 DB2 database in MAS DB2 database for upgrade
Hello Experts,
With plenty of ongoing MAS upgrades, some of us must have been to this situation.
This is onprem setup for both MX7.6 and MAS. MX 7.6 uses DB2 enterprise edition and MAS has DB2 warehouse version (on/via Cloud pak for Data), have you tried to take backup of db from MX7.6 and restore that inside MAS cluster's DB2 warehouse version database?
normal import/export works fine or we need to do some additional configuration?
------------------------------
Chandan Singh
------------------------------