Migrate data from ALM/PC to SaaS
This section provides instructions about how to migrate ALM/PC data from on-premises to SaaS.
Every ALM/PC project has its own database schema and file repository. Perform all the steps in this topic for every project you want to migrate to SaaS.
Obtain file repository size
Follow the step below to obtain the size of the file repository from the file server.
-
Open ALM Site Administration.
-
Select the project you want to migrate. In the Project Details tab, under Project Directory, find the file repository path of the project.
-
On the file server machine, go to the repository path of the project and run the following command.
UNIXTo summarize the directory and all sub-directories and display size values in a human-readable format, use:
Copy codedu –sh <directory name>
For example,
Copy coderoot@ubuntu# du -sh /usr/ X11R6
4.0K /usr/X11If you find all your path repositories follow the same path, use the following command to show the summary of only the first level of the sub-directories within the folder. This summary lets you know the size of all the file repositories folders on the same path.
For example,
Copy coderoot@ubuntu# du -sh /usr/*
4.0K /usr/X11R6
96M /usr/bin
24K /usr/games
12M /usr/include
164M /usr/lib
0 /usr/lib64
96K /usr/local
25M /usr/sbin
197M /usr/share
4.0K /usr/srcWindowsRight-click the folder and select Properties to view the size of the folder.
Obtain database schema size
Follow the steps below to obtain the size of the database schema.
-
Open ALM Site Administration.
-
Select the project you want to migrate. In the Project Details tab, under Database Name, find the database schema of the project. Under Database Server, find the server where the schema is located.
-
On the database server, run the following command to obtain the size of the database schema.
OracleTo obtain the size of the DB_USER_SCHEMA schema, connect to the Oracle instance and run the following SQL query.
-
To obtain the size of each database schema, run:
Copy codeSELECT SUM(BYTES)/1024/1024 "MB" FROM DBA_SEGMENTS WHERE owner='<SCHEMA>';
-
To obtain the size of all database schemas at one time, run:
Copy codeSELECT owner, SUM(BYTES)/1024/1024 "MB" FROM DBA_SEGMENTS group by owner
SQL ServerRun the following command to print a summary of space used in the current database.
Copy codesp_spaceused
Output:
Copy codedatabase_name database_size
--------------- ---------------------------
master 5 MB
reserved data index_size unused
--------- --------- ----------- --------
2176 KB 1374 KB 72 KB 730 KBNote: The database_size metric shows the size of the current database in megabytes, including both data and log files.
-
Export database schema
Export the database schema of each project you want to migrate.
Prerequisites
Consider the following prerequisites before you export the database schema.
MD5 software | For example, md5. |
FTP server | An FTP server location provided by your CSM during the migration process. |
To export the database schema:
Perform one of the following export actions, depending on your database type:
-
Connect to the database server as a database user.
-
Run the following command for each schema you want to export.
Copy codeexpdp system/<password> schemas=<schema name> dumpfile=<schema name>_<date>.dmp logfile=<schema
name>_<date>.log exclude=statistics directory=DATA_PUMP_DIR -
Connect to the database as a system user, for example, sqlplus system/<password>, and run the following command to loate your data dump directory:
Copy codeSELECT directory_path FROM dba_directories WHERE directory_name = 'DATA_PUMP_DIR';
-
Change to the directory. The dump files are displayed.
-
Compress the backups of the database schemas.
-
Run
md5sum
. -
Open a command window, go to the location where the md5.zip file was extracted, and run the following command.
Copy codemd5.exe -generate <compressed folder path><compressed folder name.zip>
For example:
Copy codemd5.exe – generate C:\”Documents and Settings”\Desktop\ project1_filereposiotry.zip
The command returns the md5sum output. For example,
Copy code24BCED0C939DD7E61C6E4CCE252687BE db_schemas.zip
-
Copy the output to a text file.
- Upload the compressed database schema and the text file to the FTP server.
-
Back up the database schemas by one of the following options.
-
Compress the backups of the database schemas.
-
Run
md5sum
. -
Open a command window, go to the location where the md5.zip file was extracted, and run the following command:
Copy codemd5.exe -generate <compressed folder path><compressed folder name.zip>
For example:
Copy codemd5.exe – generate C:\”Documents and Settings”\Desktop\ project1_filereposiotry.zip
The command returns the md5sum output. For example,
Copy code24BCED0C939DD7E61C6E4CCE252687BE db_schemas.zip
-
Copy the output to a text file.
-
Upload the compressed database schema and the text file to the FTP server.
Export file repository
Follow the steps below to export the file repository.
-
Open ALM Site Administration.
-
Select the project you want to migrate. In the Project Details tab, under Project Directory, find the file repository path of the project.
-
Connect to the application server, go to the project directory path, and compress the entire file repository folder.
-
Run
md5sum
. -
Open a command window, go to the location where the md5.zip file was extracted, and run the following command:
Copy codemd5.exe -generate <compressed folder path><compressed folder name.zip>
For example,
Copy codemd5.exe – generate C:\”Documents and Settings”\Desktop\ project1_filereposiotry.zip
The command returns the md5sum output. For example,
Copy code24BCED0C939DD7E61C6E4CCE252687BE db_schemas.zip
-
Copy the output to a text file.
-
Upload the compressed file repository and the text file to the FTP server.
-
Repeat the above steps for each project you want to migrate.
Migrate users to SaaS
Follow the steps below to migrate users from on-premises to SaaS.
-
From the ALM server, search for the site admin schema name.
-
Log in to the ALM server.
-
Go to the directory where ALM is installed.
-
Go to the directory where the siteadmin.xml file is saved.
-
Open the file and search for the site admin schema name using the DBNAME tags. For example,
Copy code<DbName>qc_sa_esar_db</DbName>
-
-
Contact the DBAs to search for the users tables on the site admin schema. The DBAs need to then perform a select all query from the users tables.
For example:
Copy codeselect * from td.users
-
Copy the results of the select all query into an Excel spreadsheet and upload it to the FTP server.
See also: