This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
deploy:ibm_ilmt_upgrade [2024/06/18 16:47] manu |
deploy:ibm_ilmt_upgrade [2025/08/23 23:18] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
If you paln to change IP/hostname, be sure to keep an alias DNS on previous hostname !!! | If you paln to change IP/hostname, be sure to keep an alias DNS on previous hostname !!! | ||
+ | |||
+ | ===== Backup from previous server ===== | ||
+ | |||
+ | Before starting, save the licenses and DB from previous server | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 backup]# ll /backup | ||
+ | 988964 -rw------- 1 db2inst1 db2iadm1 1012699136 Jun 16 01:02 BESREPOR.0.db2inst1.DBPART000.20240616010200.001 | ||
+ | 13621784 -rw------- 1 db2inst1 db2iadm1 13948706816 Jun 16 01:01 BFENT.0.db2inst1.DBPART000.20240616010108.001 | ||
+ | 6638792 -rw------- 1 db2inst1 db2iadm1 6798123008 Jun 16 01:02 TEMADB.0.db2inst1.DBPART000.20240616010208.001 | ||
+ | </cli> | ||
+ | |||
+ | |||
+ | Here are the licences from previous server | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 license]# ll /backup/license/ | ||
+ | 52 -rw-r--r-- 1 root root 51406 May 27 14:55 license.crt | ||
+ | 4 -rw-r--r-- 1 root root 3418 May 27 14:55 license.pvk | ||
+ | 36 -rw-r--r-- 1 root root 34740 May 27 14:56 masthead.afxm | ||
+ | </cli> | ||
===== Server ===== | ===== Server ===== | ||
Line 107: | Line 126: | ||
</cli> | </cli> | ||
- | <fc #ff0000>To satisfy db2precheck, I've created a new LV for /tmp, and just overmount (no entry into /etc/fstab)</fc> | + | **To satisfy db2precheck, I've created a new LV for /tmp, and just overmount (no entry into /etc/fstab)** |
==== Downloading the BigFix installer for Linux ==== | ==== Downloading the BigFix installer for Linux ==== | ||
Line 318: | Line 337: | ||
=== Install BigFix server v10.0.11.108 (with option -reuseDb) === | === Install BigFix server v10.0.11.108 (with option -reuseDb) === | ||
+ | |||
+ | Here are the licences from previous server | ||
+ | <cli> | ||
+ | [root@BIGFIX01 license]# ll /backup/license/ | ||
+ | 52 -rw-r--r-- 1 root root 51406 May 27 14:55 license.crt | ||
+ | 4 -rw-r--r-- 1 root root 3418 May 27 14:55 license.pvk | ||
+ | 36 -rw-r--r-- 1 root root 34740 May 27 14:56 masthead.afxm | ||
+ | </cli> | ||
Download the BigFix server from web site https://support.bigfix.com/bes/install/downloadbes.html | Download the BigFix server from web site https://support.bigfix.com/bes/install/downloadbes.html | ||
Line 445: | Line 472: | ||
</cli> | </cli> | ||
+ | ===== Install, restore DB ILMT ===== | ||
+ | |||
+ | ==== Prerequisites ==== | ||
+ | |||
+ | Check the maximum connections else change it (min 8) | ||
+ | <cli prompt='$'> | ||
+ | [db2inst1@BIGFIX01 ~]$ db2 get dbm cfg | grep NUMDB | ||
+ | Max number of concurrently active databases (NUMDB) = 32 | ||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ db2 update dbm cfg using numdb 34 | ||
+ | </cli> | ||
+ | |||
+ | Start from scratch Without a DB, leave installer to setup it | ||
+ | <cli prompt='$'> | ||
+ | [db2inst1@BIGFIX01 ~]$ db2 list db directory | ||
+ | |||
+ | System Database Directory | ||
+ | |||
+ | Number of entries in the directory = 3 | ||
+ | |||
+ | Database 1 entry: | ||
+ | |||
+ | Database alias = BESREPOR | ||
+ | Database name = BESREPOR | ||
+ | Local database directory = /home/db2inst1 | ||
+ | Database release level = 15.00 | ||
+ | Comment = | ||
+ | Directory entry type = Indirect | ||
+ | Catalog database partition number = 0 | ||
+ | Alternate server hostname = | ||
+ | Alternate server port number = | ||
+ | |||
+ | Database 2 entry: | ||
+ | |||
+ | Database alias = TEMADB | ||
+ | Database name = TEMADB | ||
+ | Local database directory = /home/db2inst1 | ||
+ | Database release level = 15.00 | ||
+ | Comment = ILMT database | ||
+ | Directory entry type = Indirect | ||
+ | Catalog database partition number = 0 | ||
+ | Alternate server hostname = | ||
+ | Alternate server port number = | ||
+ | ... | ||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ db2 deactivate db TEMADB | ||
+ | DB20000I The DEACTIVATE DATABASE command completed successfully. | ||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ db2 drop db TEMADB | ||
+ | DB20000I The DROP DATABASE command completed successfully. | ||
+ | </cli> | ||
+ | |||
+ | Ensure that the DB2 user has the DBAUTH permission for the BigFix database (BFENT), here we 'll use **db2inst1** for configuration on the web interface | ||
+ | <cli prompt='$'> | ||
+ | [db2inst1@BIGFIX01 ~]$ db2 connect to bfent | ||
+ | |||
+ | Database Connection Information | ||
+ | |||
+ | Database server = DB2/LINUXX8664 11.5.8.0 | ||
+ | SQL authorization ID = DB2INST1 | ||
+ | Local database alias = BFENT | ||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ db2 "SELECT * FROM SYSCAT.DBAUTH" | ||
+ | |||
+ | GRANTOR GRANTORTYPE GRANTEE GRANTEETYPE BINDADDAUTH CONNECTAUTH CREATETABAUTH DBADMAUTH EXTERNALROUTINEAUTH IMPLSCHEMAAUTH LOADAUTH NOFENCEAUTH QUIESCECONNECTAUTH LIBRARYADMAUTH SECURITYADMAUTH SQLADMAUTH WLMADMAUTH EXPLAINAUTH DATAACCESSAUTH ACCESSCTRLAUTH CREATESECUREAUTH | ||
+ | -------------------------------------------------------------------------------------------------------------------------------- ----------- -------------------------------------------------------------------------------------------------------------------------------- ----------- ----------- ----------- ------------- --------- ------------------- -------------- -------- ----------- ------------------ -------------- --------------- ---------- ---------- ----------- -------------- -------------- ---------------- | ||
+ | SYSIBM S DB2INST1 | ||
+ | 2 record(s) selected. | ||
+ | </cli> | ||
+ | |||
+ | ==== Install ILMT ==== | ||
+ | |||
+ | Change the response file **install_response.txt** to accept licenses... | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 ILMT_Server_Lnx-x86-64_V9235]# pwd | ||
+ | /backup/install/ILMT_Server_Lnx-x86-64_V9235 | ||
+ | [root@BIGFIX01 ILMT_Server_Lnx-x86-64_V9235]# cat install_response.txt | grep -v '^#' | ||
+ | RSP_LICENSE_ACCEPTED=true | ||
+ | RSP_DISABLE_PREREQ_WARNINGS=true | ||
+ | RSP_TLM_ROOT=/opt/ibm/LMT | ||
+ | RSP_TLM_HTTPS_PORT=9081 | ||
+ | RSP_VMMAN_SERVICE_PORT=25001 | ||
+ | |||
+ | [root@BIGFIX01 ILMT_Server_Lnx-x86-64_V9235]# setup-server-linux-x86_64.sh -f ./install_response.txt -i silent | ||
+ | </cli> | ||
+ | |||
+ | Now go to the Web interface https://bigfix01:9081/ | ||
+ | |||
+ | Here you have to create the DB TEAMDB | ||
+ | * port: 25010 | ||
+ | * Database Name: TEAMDB | ||
+ | * User name: db2inst1 | ||
+ | * DB2 instance owner: db2inst1 | ||
+ | |||
+ | Once done, select datasource: **BigFix** | ||
+ | |||
+ | |||
+ | Now asking for password for user ILMTAdmin | ||
+ | |||
+ | |||
+ | ==== Now restore ILMT DB to previous state ==== | ||
+ | |||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 ~]# /etc/rc.d/init.d/LMTserver stop | ||
+ | Stopping LMT server | ||
+ | Stopping the local VM Manager Tool. | ||
+ | |||
+ | Stopping server server1. | ||
+ | Server server1 stopped. | ||
+ | [root@BIGFIX01 ~]# su - db2inst1 | ||
+ | </cli> | ||
+ | <cli prompt='$'> | ||
+ | [db2inst1@BIGFIX01 ~]$ db2 connect to temadb | ||
+ | |||
+ | Database Connection Information | ||
+ | |||
+ | Database server = DB2/LINUXX8664 11.5.8.0 | ||
+ | SQL authorization ID = DB2INST1 | ||
+ | Local database alias = TEMADB | ||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ db2 terminate | ||
+ | DB20000I The TERMINATE command completed successfully. | ||
+ | [db2inst1@BIGFIX01 ~]$ db2 deactivate db TEMADB | ||
+ | DB20000I The DEACTIVATE DATABASE command completed successfully. | ||
+ | [db2inst1@BIGFIX01 ~]$ db2 restore db TEMADB from /backup/database replace existing | ||
+ | |||
+ | SQL2523W Warning! Restoring to an existing database that is different from | ||
+ | the database on the backup image, but have matching names. The target database | ||
+ | will be overwritten by the backup version. The Roll-forward recovery logs | ||
+ | associated with the target database will be deleted. | ||
+ | DB20000I The RESTORE DATABASE command completed successfully. | ||
+ | [db2inst1@BIGFIX01 ~]$ db2 activate db TEMADB | ||
+ | DB20000I The ACTIVATE DATABASE command completed successfully. | ||
+ | [db2inst1@BIGFIX01 ~]$ logout | ||
+ | </cli> | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 ~]# /etc/rc.d/init.d/LMTserver start | ||
+ | Starting LMT server | ||
+ | </cli> | ||
+ | |||
+ | Now test: https://bigfix01:9081/sam with user ILMTAdmin | ||
+ | |||
+ | ==== Upgrade BigFix from 10 to 11 ==== | ||
+ | |||
+ | === Compatibility matrix === | ||
+ | |||
+ | |||
+ | Minimum level to upgrade to 11 is 10.0.7 | ||
+ | <cli prompt='$'> | ||
+ | [db2inst1@BIGFIX01 ~]$ rpm -qa | grep BES | ||
+ | BESWebReportsServer-10.0.11.108-rhel.x86_64 | ||
+ | BESRootServer-10.0.11.108-rhel.x86_64 | ||
+ | BESAgent-10.0.11.108-rhe6.x86_64 | ||
+ | </cli> | ||
+ | |||
+ | DB2 versions supported for BigFix 11 | ||
+ | |||
+ | |||
+ | <cli prompt='$'> | ||
+ | [db2inst1@BIGFIX01 ~]$ db2ls | ||
+ | |||
+ | Install Path Level Fix Pack Special Install Number Install Date Installer UID | ||
+ | --------------------------------------------------------------------------------------------------------------------- | ||
+ | /opt/ibm/db2/V11.5 11.5.8.0 0 Mon May 6 18:25:03 2024 CEST 0 | ||
+ | </cli> | ||
+ | |||
+ | ILMT 9.2.35 compatibility matrix with BigFix | ||
+ | |||
+ | {{:bigfix:pasted:20240610-152135.png?500}} | ||
+ | |||
+ | === Upgrade BigFix === | ||
+ | |||
+ | Log is available at place: **/var/log/BESInstall.log** | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 ServerInstaller_11.0.2.125-rhe7.x86_64]# pwd | ||
+ | /backup/install/ServerInstaller_11.0.2.125-rhe7.x86_64 | ||
+ | |||
+ | [root@BIGFIX01 ServerInstaller_11.0.2.125-rhe7.x86_64]# ./install.sh -upgrade | ||
+ | Welcome to the upgrade of BigFix version 11.0.2.125 | ||
+ | Info: The ODBC driver configuration for DB2 was already installed. | ||
+ | Info: Stopping server services ... | ||
+ | Info: The rpm './repos/BESRootServer-11.0.2.125-rhel.x86_64.rpm' was installed successfully. | ||
+ | Info: Configuring the database for the server component, please wait ... | ||
+ | Info: The database for the server component was configured successfully. | ||
+ | Info: Stopping the client service ... | ||
+ | Info: The rpm './repos/BESAgent-11.0.2.125-rhe7.x86_64.rpm' was installed successfully. | ||
+ | Info: Stopping Web Reports service ... | ||
+ | Info: The ODBC driver configuration for DB2 was already installed. | ||
+ | Info: The rpm './repos/BESWebReportsServer-11.0.2.125-rhel.x86_64.rpm' was installed successfully. | ||
+ | Info: Configuring the database for the Web Reports component, please wait ... | ||
+ | Info: The database for the Web Reports component was configured successfully. | ||
+ | Info: The service 'BESRootServer' started successfully. | ||
+ | Info: The service 'BESFillDB' started successfully. | ||
+ | Info: The service 'BESGatherDB' started successfully. | ||
+ | Info: The service 'BESClient' started successfully. | ||
+ | Info: The service 'BESWebReportsServer' started successfully. | ||
+ | The 'BigFix' upgrade completed successfully. | ||
+ | </cli> | ||
+ | |||
+ | Propagate license (log file: **/var/log/BESAdminDebugOut.txt**) | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 ServerInstaller_11.0.2.125-rhe7.x86_64]# /opt/BESServer/bin/BESAdmin.sh -syncmastheadandlicense -sitePvkLocation=/backup/license/license.pvk | ||
+ | Please enter the sitePvkPassword: | ||
+ | |||
+ | Validating new license | ||
+ | Importing new license | ||
+ | Stopping server services | ||
+ | Updating masthead | ||
+ | Creating new server signing certificates | ||
+ | Creating new client CA certificates | ||
+ | Re-signing user data | ||
+ | Re-signing sites data | ||
+ | Re-signing role data | ||
+ | Re-signing LDAP settings | ||
+ | Re-signing custom site writers | ||
+ | Updating encrypted WebUI data | ||
+ | Re-signing SAML identity provider configuration | ||
+ | Re-signing Admin Fields | ||
+ | Re-signing custom content | ||
+ | Re-signing custom actions | ||
+ | Re-signing role subscriptions | ||
+ | Re-signing management rights actions | ||
+ | Re-signing site subscription actions | ||
+ | Re-signing mailbox files | ||
+ | Re-signing metadata | ||
+ | Queueing propagation | ||
+ | Restarting stopped services | ||
+ | The masthead and license have been updated. | ||
+ | </cli> | ||
+ | |||
+ | === Install latest console === | ||
+ | |||
+ | Download the 2 following files, transfert it to Windows in same folder and double click to install | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 ~]# ll /var/opt/BESInstallers/Console/ | ||
+ | 68 -rw-r--r-- 1 root root 66284 Jun 10 14:27 actionsite.afxm | ||
+ | 51164 -rwxr-xr-x 1 root root 52391536 Jun 10 14:27 setup.exe | ||
+ | </cli> | ||
+ | |||
+ | ==== Upgrade DB2 from 11.5.8.0 to 11.5.9.0 ==== | ||
+ | |||
+ | Precheck | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 server_dec]# /opt/ibm/db2/V11.5/adm/db2licm -l | ||
+ | Product name: "DB2 Standard Edition" | ||
+ | License type: "Virtual Processor Core" | ||
+ | Expiry date: "Permanent" | ||
+ | Product identifier: "db2std" | ||
+ | Version information: "11.5" | ||
+ | Max amount of memory (GB): "128" | ||
+ | Max number of cores: "16" | ||
+ | Enforcement policy: "Hard Stop" | ||
+ | Features: | ||
+ | IBM DB2 Performance Management Offering: "Not licensed" | ||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ /opt/ibm/db2/V11.5/bin/db2level | ||
+ | DB21085I This instance or install (instance name, where applicable: | ||
+ | "db2inst1") uses "64" bits and DB2 code release "SQL11058" with level | ||
+ | identifier "0609010F". | ||
+ | Informational tokens are "DB2 v11.5.8.0", "s2209201700", "DYN2209201700AMD64", | ||
+ | and Fix Pack "0". | ||
+ | Product is installed at "/opt/ibm/db2/V11.5". | ||
+ | </cli> | ||
+ | |||
+ | Upgrade DB2 (untar the package 11.5.9, and update) | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 install]# ll | ||
+ | 4 drwxr-xr-x 3 root root 4096 Oct 27 2023 server_dec | ||
+ | 1912200 -rw-r--r-- 1 root root 1958088887 Jun 11 18:12 v11.5.9_linuxx64_server_dec.tar.gz | ||
+ | [root@BIGFIX01 install]# cd server_dec | ||
+ | [root@BIGFIX01 server_dec]# cd .. | ||
+ | [root@BIGFIX01 install]# pwd | ||
+ | /backup/install | ||
+ | [root@BIGFIX01 install]# cd server_dec/ | ||
+ | |||
+ | [root@BIGFIX01 server_dec]# ll | ||
+ | total 88 | ||
+ | 4 drwxr-xr-x 3 root root 4096 Oct 27 2023 . | ||
+ | 0 drwxrwxrwx. 7 root root 207 Jun 18 14:55 .. | ||
+ | 0 drwxr-xr-x 6 root root 134 Oct 27 2023 db2 | ||
+ | 8 -r--r--r-- 1 root root 4987 Oct 27 2023 db2checkCOL_readme.txt | ||
+ | 20 -r--r--r-- 1 root root 16790 Oct 27 2023 db2checkCOL.tar.gz | ||
+ | 8 -r-xr-xr-x 1 root root 5254 Oct 27 2023 db2ckupgrade | ||
+ | 8 -r-xr-xr-x 1 root root 5207 Oct 27 2023 db2_deinstall | ||
+ | 8 -r-xr-xr-x 1 root root 5077 Oct 27 2023 db2_install | ||
+ | 8 -r-xr-xr-x 1 root root 5041 Oct 27 2023 db2ls | ||
+ | 8 -r-xr-xr-x 1 root root 5059 Oct 27 2023 db2prereqcheck | ||
+ | 8 -r-xr-xr-x 1 root root 5059 Oct 27 2023 db2setup | ||
+ | 8 -r-xr-xr-x 1 root root 5095 Oct 27 2023 installFixPack | ||
+ | [root@BIGFIX01 server_dec]# ./installFixPack | ||
+ | Read the license agreement file in the db2/license directory. | ||
+ | |||
+ | *********************************************************** | ||
+ | To accept those terms, enter "yes". Otherwise, enter "no" to cancel the install process. [yes/no] | ||
+ | yes | ||
+ | |||
+ | Enter the full path of the base installation directory: | ||
+ | |||
+ | ------------------------------------------------------- | ||
+ | /opt/ibm/db2/V11.5 | ||
+ | |||
+ | Do you want to choose a different installation directory for the fix pack? [yes/no] | ||
+ | |||
+ | ------------------------------------------------------------------------------------ | ||
+ | no | ||
+ | |||
+ | DBI1017I installFixPack is updating the database products installed in | ||
+ | location /opt/ibm/db2/V11.5. | ||
+ | |||
+ | |||
+ | DB2 installation is being initialized. | ||
+ | |||
+ | Total number of tasks to be performed: 56 | ||
+ | Total estimated time for all tasks to be performed: 2759 second(s) | ||
+ | |||
+ | Task #1 start | ||
+ | Description: Stopping DB2 Fault Monitor | ||
+ | Estimated time 10 second(s) | ||
+ | Task #1 end | ||
+ | |||
+ | Task #2 start | ||
+ | ... | ||
+ | Task #56 start | ||
+ | Description: Updating existing DB2 instances | ||
+ | Estimated time 60 second(s) | ||
+ | Task #56 end | ||
+ | |||
+ | The execution completed with warnings. | ||
+ | |||
+ | For more information see the DB2 installation log at | ||
+ | "/tmp/installFixPack.log.2005962". | ||
+ | </cli> | ||
+ | |||
+ | Postcheck | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 server_dec]# /opt/ibm/db2/V11.5/adm/db2licm -l | ||
+ | Product name: "DB2 Standard Edition" | ||
+ | License type: "Virtual Processor Core" | ||
+ | Expiry date: "Permanent" | ||
+ | Product identifier: "db2std" | ||
+ | Version information: "11.5" | ||
+ | Max amount of memory (GB): "128 | ||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ /opt/ibm/db2/V11.5/bin/db2level | ||
+ | DB21085I This instance or install (instance name, where applicable: | ||
+ | "db2inst1") uses "64" bits and DB2 code release "SQL11059" with level | ||
+ | identifier "060A010F". | ||
+ | Informational tokens are "DB2 v11.5.9.0", "s2310270807", "DYN2310270807AMD64", | ||
+ | and Fix Pack "0". | ||
+ | Product is installed at "/opt/ibm/db2/V11.5". | ||
+ | |||
+ | [root@BIGFIX01 server_dec]# /opt/ibm/db2/V11.5/instance/db2ilist -g db2inst1 | ||
+ | #name:vrmf:sqllibdir:db2dir:instancetype:build | ||
+ | db2inst1:11.5.9.0:/home/db2inst1/sqllib:/opt/ibm/db2/V11.5:ese:s2310270807 | ||
+ | |||
+ | [root@BIGFIX01 server_dec]# /opt/ibm/db2/V11.5/bin/db2greg -dump | ||
+ | V,DB2GPRF,DB2SYSTEM,BIGFIX01,/opt/ibm/db2/V11.5, | ||
+ | I,DB2,11.5.9.0,db2inst1,/home/db2inst1/sqllib,,1,0,/opt/ibm/db2/V11.5,, | ||
+ | S,TSA,4.1.1.1,/opt/IBM/tsamp,DG_NOT_ALLOWED,DB2_INSTALLED,0,0,-,1718717222,0 | ||
+ | S,RSCT,3.3.1.2,/usr/sbin/rsct,DG_NOT_ALLOWED,DB2_INSTALLED,0,0,-,1718717222,0 | ||
+ | S,PCMK,2.1.6.4,/usr/sbin,DG_NOT_ALLOWED,DB2_INSTALLED,0,0,-,1718717222,0 | ||
+ | S,DB2,11.5.9.0,/opt/ibm/db2/V11.5,,,0,0,,1718717286,0 | ||
+ | </cli> | ||
+ | |||
+ | Check Database version | ||
+ | <cli prompt='$'> | ||
+ | [db2inst1@BIGFIX01 ~]$ db2 list database directory | ||
+ | |||
+ | System Database Directory | ||
+ | |||
+ | Number of entries in the directory = 3 | ||
+ | |||
+ | Database 1 entry: | ||
+ | |||
+ | Database alias = BESREPOR | ||
+ | Database name = BESREPOR | ||
+ | Local database directory = /home/db2inst1 | ||
+ | Database release level = 15.00 | ||
+ | Comment = | ||
+ | Directory entry type = Indirect | ||
+ | Catalog database partition number = 0 | ||
+ | Alternate server hostname = | ||
+ | Alternate server port number = | ||
+ | |||
+ | Database 2 entry: | ||
+ | |||
+ | Database alias = TEMADB | ||
+ | Database name = TEMADB | ||
+ | Local database directory = /home/db2inst1 | ||
+ | Database release level = 15.00 | ||
+ | Comment = ILMT database | ||
+ | Directory entry type = Indirect | ||
+ | Catalog database partition number = 0 | ||
+ | Alternate server hostname = | ||
+ | Alternate server port number = | ||
+ | |||
+ | Database 3 entry: | ||
+ | |||
+ | Database alias = BFENT | ||
+ | Database name = BFENT | ||
+ | Local database directory = /home/db2inst1 | ||
+ | Database release level = 15.00 | ||
+ | Comment = | ||
+ | Directory entry type = Indirect | ||
+ | Catalog database partition number = 0 | ||
+ | Alternate server hostname = | ||
+ | Alternate server port number = | ||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ db2 connect to BESREPOR | ||
+ | |||
+ | Database Connection Information | ||
+ | |||
+ | Database server = DB2/LINUXX8664 11.5.9.0 | ||
+ | SQL authorization ID = DB2INST1 | ||
+ | Local database alias = BESREPOR | ||
+ | |||
+ | |||
+ | [db2inst1@BIGFIX01 ~]$ db2 "SELECT service_level, fixpack_num FROM TABLE(sysproc.env_get_inst_info()) as INSTANCEINFO" | ||
+ | |||
+ | SERVICE_LEVEL FIXPACK_NUM | ||
+ | -------------------------------------------------------------------------------------------------------------------------------- ----------- | ||
+ | DB2 v11.5.9.0 0 | ||
+ | |||
+ | 1 record(s) selected. | ||
+ | </cli> | ||
+ | |||
+ | ===== Script to backup DB2 ===== | ||
+ | |||
+ | As root | ||
+ | <cli prompt='#'> | ||
+ | [root@BIGFIX01 scripts]# cat bigfix_backup.sh | ||
+ | </cli> | ||
+ | <code> | ||
+ | #!/usr/bin/ksh | ||
+ | #================================================================================== | ||
+ | # | ||
+ | # FILE: bigfix_backup.ksh | ||
+ | # | ||
+ | # PURPOSE: Backup BigFix + ILMT Server | ||
+ | # | ||
+ | # AUTHOR: | ||
+ | # | ||
+ | # PARAMETERS: | ||
+ | # | ||
+ | # SAMPLES: | ||
+ | # | ||
+ | #================================================================================== | ||
+ | # To check DB consistency | ||
+ | # [db2inst1@BIGFIX01 ~]$ /opt/ibm/db2/V11.5/bin/db2ckbkp -h /backup/TEMADB.0.db2inst1.DBPART000.20240618172214.001 | ||
+ | # Image Verification Complete - successful. | ||
+ | |||
+ | |||
+ | |||
+ | echo "**********************************" | ||
+ | echo "***** Stopping BigFix Server *****" | ||
+ | echo "**********************************" | ||
+ | date '+%Y-%m-%d %H:%M:%S' | ||
+ | /etc/init.d/LMTserver stop | ||
+ | for svc in besclient.service beswebreports.service besgatherdb.service besfilldb.service besserver.service | ||
+ | do | ||
+ | systemctl stop $svc | ||
+ | done | ||
+ | |||
+ | echo "**********************************" | ||
+ | echo "***** Removing old backups *****" | ||
+ | echo "**********************************" | ||
+ | date '+%Y-%m-%d %H:%M:%S' | ||
+ | rm -f /backup/BFENT* | ||
+ | rm -f /backup/BESREPOR* | ||
+ | rm -f /backup/TEMADB* | ||
+ | echo "**********************************" | ||
+ | echo "***** Backup DB2 to disk *****" | ||
+ | echo "**********************************" | ||
+ | date '+%Y-%m-%d %H:%M:%S' | ||
+ | echo "backup DB BFENT" | ||
+ | /usr/sbin/runuser -l db2inst1 -c "db2 backup db BFENT to /backup" | ||
+ | echo "backup DB BESREPOR" | ||
+ | /usr/sbin/runuser -l db2inst1 -c "db2 backup db BESREPOR to /backup" | ||
+ | echo "backup DB TEMADB" | ||
+ | /usr/sbin/runuser -l db2inst1 -c "db2 backup db TEMADB to /backup" | ||
+ | |||
+ | ### If error | ||
+ | #[root@BIGFIX01 backup]# /usr/sbin/runuser -l db2inst1 -c "db2 backup db TEMADB to /backup" | ||
+ | #SQL1035N The operation failed because the specified database cannot be | ||
+ | #connected to in the mode requested. SQLSTATE=57019 | ||
+ | #db2 connect to DBXX | ||
+ | #db2 quiesce database immediate force connections | ||
+ | #db2 connect reset | ||
+ | #db2 terminate | ||
+ | #db2 deactivate database DBXX | ||
+ | #db2 terminate | ||
+ | #db2 "backup database DBXX to /backup | ||
+ | |||
+ | echo "**********************************" | ||
+ | echo "***** Backup to TSM *****" | ||
+ | echo "**********************************" | ||
+ | date '+%Y-%m-%d %H:%M:%S' | ||
+ | # Here you can add backup to external source | ||
+ | echo "**********************************" | ||
+ | echo "***** Startting BigFix Server ****" | ||
+ | echo "**********************************" | ||
+ | date '+%Y-%m-%d %H:%M:%S' | ||
+ | for svc in besfilldb.service besgatherdb.service besserver.service beswebreports.service besclient.service | ||
+ | do | ||
+ | systemctl start $svc | ||
+ | done | ||
+ | /etc/init.d/LMTserver start | ||
+ | |||
+ | date '+%Y-%m-%d %H:%M:%S' | ||
+ | </code> | ||