Upgrade Splunk UBA prerequisites
Upgrading to Splunk UBA version 5.4.5 requires Splunk UBA version 5.4.4. See How to install or upgrade to this release of Splunk UBA for upgrade path information.
- If you are running a version lower than 5.1.0, you must first upgrade to version 5.1.0, then upgrade to version 5.2.0 or 5.3.0, then upgrade to version 5.4.0, then upgrade to version 5.4.1, then upgrade to version 5.4.2, then upgrade to version 5.4.3., then upgrade to version 5.4.4, and then upgrade to version 5.4.5.
- If you are running a version lower than 5.0.5, you must first upgrade to version 5.0.5, then upgrade to version 5.1.0, then upgrade to version 5.2.0 or 5.3.0, then upgrade to version 5.4.0, then upgrade to version 5.4.1, then upgrade to version 5.4.2, then upgrade to version 5.4.3, then upgrade to version 5.4.4, and then upgrade to version 5.4.5.
Pre-upgrade tasks
Before you upgrade, perform the following tasks:
connector.splunk.protocol, the only valid value is TLSv1.2 . If you have a different value in place for that field, it is ignored and the Splunk connection configuration uses TLS v1.2.
- In RHEL Linux environments:
- Ensure that Splunk UBA has access to RHEL repositories.
- When installed on RHEL 8.x operating systems, Splunk UBA uses a 2048 bit RSA encryption key. The Splunk platform that communicates with Splunk UBA must also use a 2048 bit encryption key. See Red Hat Enterprise Linux 8.x cryptographic policies.
- Review the Known issues as well as What's new for this release in the Release Notes manual for issues, enhancements, and changes that might need to be addressed before upgrading.
- The software update contains two archive files approximately 1.1G and 4.8G. The total file size after extraction is 9.1G. Verify that you have enough free space in /home/caspida to store the extracted installer files.
- Backup your system. See Prepare to backup Splunk UBA in Administer Splunk User Behavior Analytics.
- Make sure your system is running normally by using the
uba_health_check.shshell script.PLAINTEXT/opt/caspida/bin/utils/uba_health_check.shSee Check system status before and after installation for more information about the script.
- When you upgrade Splunk UBA to version 5.4.5, the Splunk UBA Monitoring App as present on UBA nodes is also upgraded to the latest app version of 1.1.5. This monitoring app upgrade overwrites files in the
/opt/splunk/etc/apps/Splunk_UBA_Monitor/default/directory.If you made any changes to these files, backup your changes before starting the UBA upgrade process. You can later apply those changes back.
Note: As a best practice, make changes in the local directory (/opt/splunk/etc/apps/Splunk_UBA_Monitor/local/) and not the default directory. - If your caspida account user has restricted sudo access, follow the steps in Enable all sudo access for the caspida account to temporarily provide sudo access privileges.
- After the upgrade is complete, follow the steps in Restrict sudo access for the caspida account to re-secure your caspida user.
Verify Postgres Collate and Ctype values
Perform the following steps to verify the values of Collate and Ctype:
- Check the Collate and Ctype values in a database. Confirm the values are
en_US.UTF-8.Run the following command:
PLAINTEXTpsql -d caspidadb -c "\l" - If the values are correct, you are done. Do not run
migrate_psql_collate_ctype.shor any of the numbered migration steps in the following subsection. Continue with the standard UBA upgrade prerequisites and upgrade instructions.The following image shows an example of correct Collate and Ctype values:
en_US.UTF-8, perform the following steps before proceeding with a UBA upgrade.
en_US.UTF-8 for caspidadb as shown by psql -d caspidadb -c "\l".
- Run the following command to stop UBA and all services on the management node of the version of UBA where the Postgres Collate and Ctype configuration is not set to
en_US.UTF-8:PLAINTEXT/opt/caspida/bin/Caspida stop-all-
Keep UBA stopped on the environment while you perform the database migration steps through backup validation and restore, unless Splunk Support documents a different sequence for your deployment.
-
- Perform the following steps to extract and use the data migration script from the UBA 5.4.5 package on the database node as per your deployment:
Note: Before copying or running the script, confirm you are on the PostgreSQL database host. Check
database.hostin/opt/caspida/conf/deployment/caspida-deployment.conf- Download and extract UBA 5.4.5 upgrade package in /home/caspida/:
PLAINTEXT
$ tar xvzf /home/caspida/splunk-uba-software-upgrade-package_545.tgz Splunk-UBA-Platform-5.4.5-20260227-34401448.tgz Splunk-UBA-Platform-5.4.5-20260227-34401448.tgz.md5sum uba-ext-pkgs-5.4.5.tgz uba-ext-pkgs-5.4.5.tgz.md5sum - Extract the UBA-Platform-5.4.5 build into a temporary folder in /home/caspida/ directory:
PLAINTEXT
mkdir -p /home/caspida/tmp/ tar xfvz Splunk-UBA-Platform-5.4.5-20260227-34401448.tgz -C /home/caspida/tmp/ - Copy the
migrate_psql_collate_ctype.shscript from the above tmp directory into /opt/caspida/bin/ directory:Note: Performcp/chmodand subsequent script steps using the same supported execution context throughout . This is typically the caspida user, withsudoonly where required. Avoid alternating users without a clear, documented reason.PLAINTEXTcp /home/caspida/tmp/bin/migrate_psql_collate_ctype.sh /opt/caspida/bin/ - Provide executable permission to the
migrate_psql_collate_ctype.shscript for data migration:PLAINTEXTchmod u+x /opt/caspida/bin/migrate_psql_collate_ctype.sh
- Download and extract UBA 5.4.5 upgrade package in /home/caspida/:
- Update locale settings on your system:
System Steps RHEL/OEL 1. Update the /etc/locale.conf file with the following configuration: PLAINTEXTLANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LC_CTYPE="en_US.UTF-8"2. Run the following command to source /etc/locale:
PLAINTEXTsource /etc/localeUbuntu 1. Update the /etc/default/locale file with the following configuration: PLAINTEXTLANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LC_CTYPE="en_US.UTF-8"2. Run the following command to source /etc/default/locale:
PLAINTEXTsource /etc/default/locale- (Conditional procedure) Run
migrate_psql_collate_ctype_shonly when Postgre SQL Collate or Ctype is noten_US.UTF-8, as shown in the following code:psql -d caspidadb -c "\l". If both are alreadyen_US.UTF-8skip this procedure and continue with the standard UBA upgrade steps.- Run this procedure on the database host only.
- Follow the documented order: Run the migration script as written, validate the backup file, then restore.
- Do not rerun the backup step multiple times unless instructed by Splunk Support.
- Common issues to avoid:
-
Running this procedure when Collate and Ctype value are already correct.
-
Skipping backup validation before restore.
-
Running migration steps repeatedly without confirming each step succeeded.
-
Mixing execution contexts or users in an uncontrolled way. For example alternating sudo and the caspida user without a clear, consistent method.
-
- (Conditional procedure) Run
- Once the UBA 5.4.5 migration script is inside the /opt/caspida/ directory, run the migration script (backup and built-in post-backup steps).
On the database host, run the following:
This creates a backup file under/home/caspida/named similar topsql-backup-<DATE-TIME>. The script also performs the post-backup processing required for the collate/ctype migration, as implemented by this script.PLAINTEXT
$ /opt/caspida/bin/migrate_psql_collate_ctype.sh -bNote: Let the command finish and do not assume it is only copying data.Expected result: The command completes without errors.CAUTION: Do not continue to restore if this step fails or if you are unsure it completed successfully. - (Required) Validate backup before restore.
CAUTION: Backups from this flow are plain SQL from
pg_dumpall. Do not usepg_restore --list.- Pick one backup file under
/home/caspida/(psql-backup-*)that matches the successful-brun you are using. If several exist,the newest is not always correct. Match time to your run, then follow that path for steps B and C and for-r. - Check that the file exists and that the size is plausible but not empty:
PLAINTEXT
ls -lrth /home/caspida/ | grep psql-backup wc -c /home/caspida/<your-backup-file> - Check that the content looks like SQL and mentions caspidadb. It must not look empty or like a template. For example:
head -n 50orgrep caspidadb
Note: If anything fails, stop and contact Splunk Support. Run-rwith the same path you just validated. - Pick one backup file under
- Restore from the validated backup:
CAUTION: Only restore after step 5 succeeds.PLAINTEXT
$ /opt/caspida/bin/migrate_psql_collate_ctype.sh -r /home/caspida/<your-backup-file> - Then verify locale settings:
PLAINTEXT
psql -d caspidadb -c "\l"- Confirm that Collate and Ctype values are
en_US.UTF-8. - Operator notes:
-bruns the script's backup path andi ts built-in post-backup processing for this migration. It is not a "copy-only" manual step.-
-r <backup-file>restores from the backup file validated in step 5. -
Do not run multiple
-bruns in a row unless Splunk Support instructs you to. -
Always use the same backup file you validated when you run
-r.
- Confirm that Collate and Ctype values are
- After confirming that the configuration values are correct, start UBA and verify any potential issues with the system:
PLAINTEXT
/opt/caspida/bin/Caspida start-all
Validate the UMASK value
Ensure the UMASK value of the root user is set to 0002 or 0022, or grant read permissions for newly created files and directories to the caspida user.
Complete the following steps to validate the UMASK value:
- Check the UMASK value of the root user by running the following command. The value must be 0002 or 0022:
PLAINTEXT
umask - Verify the UMASK value in the
/etc/login.defsfile:PLAINTEXTgrep -i "^UMASK" /etc/login.defsNote: The umask value specified in/etc/login.defsapplies as the default for all users. - Validate the permissions for new files and directories:
- As the caspida user, create a new file or directory using sudo to observe the permissions:
PLAINTEXT
sudo touch testfile.txt sudo mkdir testdirectory - Next, check the permissions of the created files and directories. The read permission for
caspida(other)users is required:PLAINTEXTls -l testfile.txt ls -ld testdirectory
- As the caspida user, create a new file or directory using sudo to observe the permissions:
To set the required umask value, edit the /etc/login.defs file and set the UMASK value to 022.
Instructions to upgrade your Splunk UBA deployment
After satisfying the prerequisite requirements, go to one of the following:
- Upgrade a single node AMI or OVA installation of Splunk UBA
- Upgrade a single node RHEL installation of Splunk UBA
- Upgrade a single node OEL installation of Splunk UBA
- Upgrade a distributed AMI or OVA installation of Splunk UBA
- Upgrade a distributed RHEL installation of Splunk UBA
- Upgrade a distributed OEL installation of Splunk UBA
Upgrade multiple Splunk UBA clusters that are using warm standby
If you have two Splunk UBA clusters running in a warm standby configuration, perform the following tasks to upgrade both clusters. Links to documentation in the Administer Splunk User Behavior Analytics manual are provided. In this example, the original primary system is called System A and the standby system is called System B.
- Verify that both the System A and System B are configured for warm standby and are running as expected. See Verify that the primary and standby systems are synchronized .
- Manually trigger a sync between System A and System B. See Synchronize the primary and standby systems on-demand.
- Perform a failover from System A to System B. See Failover to a standby Splunk UBA system.
- Switch the roles of both systems to reflect the failover. See Change the role of both systems to switch the primary and standby systems.
- Failover from System B back to System A. See Failover to a standby Splunk UBA system.
- Switch the roles of both system again to reflect the second failover operation. See Change the role of both systems to switch the primary and standby systems.
- Run the
uba_health_check.shscript. See Check system status before and after installation in the Install and Upgrade Splunk User Behavior Analytics manual. - Use the health monitor to verify that both Splunk UBA systems are up and running.
- Upgrade the primary system (System A) to this release. Follow the upgrade instructions for your operating system.
- Upgrade the standby system (System B) to this release. Follow the upgrade instructions for your operating system.
- Check
/var/log/caspida/UpgradeStatus-<release>.propertieson both systems to verify that the upgrade succeeded. See Verify a successful upgrade of Splunk UBA in the Install and Upgrade Splunk User Behavior Analytics manual.