HomeDatabase AdministrationThe PureCM DatabaseMigrating from Native Database (pre-2010-1) to SQLite

2.5. Migrating from Native Database (pre-2010-1) to SQLite


We assume that you've made the decision to migrate your pre-2010-1 PureCM database to the newer SQLite format. In order to proceed, you will need to first install the new 2010-1 version of PureCM Server (choosing the SQLite database option on Windows). You will then need to shutdown PureCM Server before proceeding.

Obviously this process requires the PureCM Server to be down throughout the process.  There should be no visible difference to your users once completed (i.e. no need to recreate workspaces etc.).

Looking at the time needed, you would be looking at roughly 1h/GB for both import and export if done on the same server machine. Note that these times largely depend on hardware used and may vary.

tdbutil Database Utility 

We will be using the 'tdbutil' utility to perform the migration. This can be found in either of the following locations :-

C:\Program Files\PureCM\Server\tdbutil.exe (Windows)

/opt/purecm-server/bin/tdbutil (Linux/Unix)

Note that, in order to use tdbutil on Linux/Unix, you will also need to first execute :-

export LD_LIBRARY_PATH=/opt/purecm-server/lib

Temporary File Storage

It's also important to establish a folder/drive that can be used for temporary file storage. You will need to have space to store the size of the biggest current database plus another 25%. We will refer to this location as TMP and assume you will substitute with C:\Temp, D:\, /tmp or wherever is relevant for your server.

Establish the files to be migrated 

You then need to establish the datafiles that need to be migrated. These will typically be located in C:\PureCM\Data (Windows) or /opt/purecm-server/data (Linux/Unix). You need to find all the files ending with the .tdf extension (most will also have a matching file ending with .tbf that contains the revision data).

Migrate the Server Database

The first file to migrate is the 'server' database that contains username and overall server configuration details. You would typically perform migration of this database using :-

cd C:\Program Files\PureCM\Server\ (only on Windows)

cd /opt/purecm-server/data (only on Linux/Unix)

tdbutil export server TMP\server.xml

tdbutil import TMP\server.xml "type=sqlite;path=server;create=1"

Migrate each Repository 

You would then repeat the above for each other datafile present (normally just those beginning with 'r_' which are the repositories). We assume here that the only one present is the default 'Example' repository used typically during evaluation. You should substitute 'Example' in the instructions below with the name of your repository. 

tdbutil export r_Example TMP\r_Example.xml

tdbutil import TMP\r_Example.xml "type=sqlite;path=r_Example;create=1"   

Note that the .xml temporary files can be deleted, if necessary for space reasons, after each 'import' has completed. Once the import of all the Repositories is complete, you should also be able to move the old database files (*.tdf and *.tbf) out of the data folder and, when confident in the upgrade, remove them to free up space.

Database File Permissions 

Additionally, you will need to ensure that the newly created database files (those ending in '.db') have the correct permissions. On Linux, the files typically need to have 'purecm' as the owner, 'users' as the group and a chmod of '640' (or '-rw-r-----') - you should be able to identify the permissions of the existing files to see what's required in your environment.

On Windows, you should be able to inspect the file permissions either using the 'CACLS' command line tool or Windows Explorer via the 'Security' tab of the File Properties. Again, they will need similar permissions to the existing database files.

Check Availability after conversion

You should then be able to start the PureCM Server. You will need to monitor the Event Log (Windows) or syslog (Linux/Unix) to ensure that no errors are reported during startup.  You should probably try to connect to the server afterwards and check that all expected Repositories are visible and perform some confidence testing (create a workspace or browse Stream History etc.).

Related Pages
This page was: Helpful | Not Helpful