Exporting Control-M SaaS Data
This procedure describes how to export data from the Control-M/EM database and Control-M/Server database to use in data analytics, reporting, or integration with your enterprise systems.
The data available for export from the Control-M/EM database and Control-M/Server database is refreshed every 4 hours.
Before You Begin
- 
                                                        
Ensure that a PostgreSQL 17 database is installed on a Red Hat Linux 9 machine to store data exported from Control-M SaaS. For more information, see Setting Up a PostgreSQL Database to Store Exported Data.
 - 
                                                        
Run the config dataExport:activate::set API command to activate the Data Export feature and ensure that you remember the defined password. After running this command, wait several minutes for file generation before you proceed with the next step.
 
Begin
- 
                                                        
Run the config dataExport::get API command to retrieve a dumpfile that contains data exported from the Control-M SaaS database.
You can use this API command also to update the password to protect exported data.
 - 
                                                        
Navigate to the URL returned by the config dataExport::get API command within 60 seconds from the time you submitted the request, and download the password-protected, zipped dumpfile that contains the requested data.
Dumpfiles have the following names, which depend on the requested data type:
- 
                                                                
Control-M/EM data: EM_DumpFile
 - 
                                                                
Control-M/Server data: <serverName>_DumpFile
 - 
                                                                
Job run data: EM_RunInfoDumpFile
 
 - 
                                                                
 - 
                                                        
Unzip the downloaded dumpfile with your defined password.
The zip file contains the following files:
- 
                                                                
A .gz compressed dumpfile with the same filename as the zip file
 - 
                                                                
A manifest.info file with information about the .gz dumpfile, including its creation timestamp
 
 - 
                                                                
 - 
                                                        
Unzip the .gz compressed dumpfile by running the following command:
gunzip -c dumpfile_name.gz > dumpfile_name.sql
gunzip -c IN01_DumpFile.gz > IN01_DumpFile.sql
 - 
                                                        
Import the dumpfile to the PostgreSQL database by running the following command:
psql -h 127.0.0.1 -U user_name -d db_name -f dumpfile_name.sql
psql -h 127.0.0.1 -U ctmuser -d ctrlmdb -f IN01_DumpFile.sql
 
Setting Up a PostgreSQL Database to Store Exported Data
This procedure describes how to set up a PostgreSQL 17 database on a Red Hat Linux 9 machine where you can store exported data.
Begin
- 
                                                        
Log in to the Linux 9 machine as root.
 - 
                                                        
Download and install the RPM package by running the following commands:
Copysudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
sudo dnf install -y postgresql17-server
sudo /usr/pgsql-17/bin/postgresql-17-setup initdb
sudo systemctl enable postgresql-17
sudo systemctl start postgresql-17 - 
                                                        
Set up a user-specific environment and startup programs with the following commands:
- 
                                                                
export PGDATA=/var/lib/pgsql/17/data
 - 
                                                                
export PATH=/usr/pgsql-17/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
 
 - 
                                                                
 - 
                                                        
Assign a password to the PostgreSQL database user and then log in with the following commands:
Copypsql
psql (17.5)
Type "help" for help.
alter user postgres with password 'bmcAdm1n';
ALTER ROLE - 
                                                        
Update database configuration in the postgresql.conf file with the following commands:
CopyChanges to postgresql.conf
Edit
listen_addresses = '*'
port = 5432
max_connections = 500 - 
                                                        
Restart the PostgreSQL server with the following commands
- 
                                                                
pg_ctl stop
 - 
                                                                
ps_ctl start
 
 - 
                                                                
 - 
                                                        
Create a user with permission to create a database by running the following command as postgres //root:
- 
                                                                
psql -U postgres
 - 
                                                                
create role ctmuser with login createdb password 'ctmpass';
 
In this example, the user is ctmuser and the password is ctmpass.
 - 
                                                                
 - 
                                                        
Create a Control-M database by running the following command:
- 
                                                                
psql -h 127.0.0.1 -U ctmuser -d postgres
 - 
                                                                
create database ctrlmdb template template1 encoding UTF8 CONNECTION LIMIT -1;
 
In this example, the database is named ctrlmdb.
 - 
                                                                
 
