Switching content database

MSSQL, RavenDB, MongoDB, MySQL

By default, Kooboo CMS runs on XML based data storage. This is suitable for websites with limited content, for example a small business websites. For larger websites, however, you should consider using other content providers. We have provided support for MSSQL, SQLCE, RavenDB, MongDB and MySql.

Download the content_provider.zip from kooboo.codeplex.com. Unzip it you should see the following folders and files.



Export and import sites

before you do the migration, first you need to export the site. After you finish the migration, you can remove the old site and do an import.

How to use another content provider

To use another content provider, copy all the files in the content provider folder into the Kooboo CMS bin folder. For example, if you are currently using the default XML-based content provider and would like to use SQLCE, copy all the files in the above screen into the Kooboo bin folder.

If you are already using a content provider other than the default XML based provider, you must first remove that content provider by removing all related dlls, most importantly Kooboo.CMS.Content.Persistence.{providername}.dll

Trust level and database server installation

SQLCE and RavenDB might be required to run at full trust level. MongoDB and RavenDB client server modes require manual installation of the server instance.

Configuration file for each content provider

For SQLServer, RavenDB, MongoDB, and MySql, you can find a .config inside each folder. You may copy that config file to the web bin folder of Kooboo CMS and correct the config values. If you don't do it this way, a config file will still be generated the first time you run the application using the new content provider. You can modify the values after it is generated, and restart the web server to load the new values.

The configuration files contains the following settings.

SQLServer

SharingDatabase: Controls whether all content repositories share one database or each content repository has its own database. Connections: Stores multiple connection strings for each database in the individual database mode. Name value is the content database name. SharingDatabaseConnectionString: If SharingDatabase is used, this is the connection string. CreateDatabaseSetting: if each content repository has its own database, this is the connection string that will be used to create each database.

So you define the value either in the SharingDatabaseConnectionString or in the CreateDatabaseSetting

SQLCe does not have configuration settings. Kooboo saves all db files in a data folder.

MongoDB

ConnectionString: The default MongoDB connection string is mongodb://localhost Sharing Database. All content repositories can share the same database or each can have its own database. The default is false.

RavenDB

Due to lack support of C# dynamic type, Kooboo only supports RavenDB from version RavenDB-Unstable-Build-283. The previous version of RavenDB is not supported.

RavenDB provides two modes, embed mode and client server mode. The embed mode stores all content database under the kooboo CMS data folder.

The server mode works quite differently from mongodb. By default, all content database share one RavenDB connection/database, you can assign different RavenDB database for each content database using the Connections section

DefaultConnection: This is the default connection used by all content database. Connections: Define RavenDB database connection to be used by one or more kooboo content database.