Uninstalling an eZDB cluster

Since users may decide not to use cluster anymore, or even choose to use another file handler, this chapter would show how to uninstall an existing eZDB cluster.

The following procedures may cause loss of information, since this is a cluster removal guide. Before proceeding, please be sure to make a complete backup of your site, cluster folder and database, to avoid losing data.

Removing an eZDB cluster

1. Clear the cache

Before starting it's better to clear the eZ Publish's cache, by running the following command from your ezpublish_legacy/ folder:

php bin/php/ezcache.php --clear-all

2. Unclusterize your eZDB cluster

Run the following shell command from your ezpublish_legacy/ folder:

php bin/php/clusterize.php -u

This will move cluster cache and binaries from the cluster path to the original locations.

3. Remove the images serving script

Remove the config.cluster.php file, which has been created while setting up the cluster environment. For that, you can use the following command from your ezpublish_legacy/ folder:

rm config.cluster.php

4. Remove the cluster database table

On MySQL the database table can be removed by executing the following shell command:

mysqladmin -u <user> -p<password> drop ezdbfile
mysqladmin -u <user> -p<password> drop ezdbfile_data

Note: On Oracle the same ezdbfile  and ezdbfile_data tables need to be removed.

5. Remove the Clustering Setting from your file.ini.append.php:

Simply edit your file.ini.append.php file and remove the ClusteringSettings block completelly. You can see an example below:

[ClusteringSettings]
FileHandler=eZDBFileHandler
DBBackend=eZDBFileHandlerMysqliBackend
DBHost=localhost
DBPort=3306
DBName=name
 
DBUser=user
DBPassword=pass

6. Disable kernel clustering debug

Disable the kernel-clustering setting from debug.ini, by setting its value to disabled, as in the following example:

[GeneralCondition]
 
kernel-clustering=disabled

7. Remove the cluster rewrite rules from the Apache configuration

Edit your apache configurations file and remove the following rules:

RewriteRule ^/var/([^/]+/)?storage/images-versioned/.* /index_cluster.php [L]
RewriteRule ^/var/([^/]+/)?storage/images/.* /index_cluster.php [L]
RewriteRule ^/var/([^/]+/)?cache/public/(stylesheets|javascript) /index_cluster.php &nbsp;[L]

8. Restart Apache and test the site

Restart the Apache web server. After it has been restarted, the system should be up and running in cluster mode. Verify that the site works correctly, content images are displayed and content binary files are accessible (open the site pages in a web browser, log in to the administration interface, try clicking around and so on).

9. Clear the cache files

Clear the cache files again, to make sure your sites generate clean caches. To do so, use the following command:

php bin/php/ezcache.php --clear-all
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.