ibexa

Path

ez publish / technical manual / 4.4 / features / clustering / maintenance


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Maintenance

When a new version of an object is created when using eZ Publish 4.2 and 4.3, the images of the first version are put into storage. But when the first version is deleted, the images are not removed completely, but remain in storage. This implies that these images are still accessible with their URL and that they have been indexed by Google. To prevent for example copyright issues, it is recommended that these images are deleted as well. Therefore it is necessary to clear expired binary items from your database cluster installations (such as eZ DB and eZ DFS). This can be done with one of two ways, either by running a script or a cronjob, depending on how regular you wish or need to delete expired images.

Use the first method for occasional maintenance. You can for example use this after upgrading to eZ Publish 4.3 in order to clean up your existing setup.
 Run the following script (how to do this depends on your system):

bin/php/clusterbinarypurge.php

If needed you can use the following options (Use --help to view all possible options):

  • dry-run: to display deleted files, without deleting anything (only applies to the bin script)
  • iteration-sleep: to pause time, in seconds, between each batch of delete operations. The default value is 1 second. Can be used as a floating point number.
  • iteration-limit: to set how many files should be deleted by SQL fetch. The default value is 100, but note that increasing this value will increase the memory footprint.
  • memory-monitoring: to monitor memory usage in var/log/clusterbinarypurge.log.

The second way is by means of a cronjob and should be used for regular maintenance. The necessary cronjob is located here:

cronjobs/clusterbinarypurge.php

This cronjob is by default part of a cronjob named cluster_maintenance. Run it with the following script from the root of the eZ Publish directory:

$php runcronjobs.php cluster_maintenance -s ezwebin_site

Note that "$php" should be replaced by the path to your php executable. Also how to run a script can differ depending on your system. Please consult your systems manual for more information.

It is recommended to run this cronjob weekly, although it can be done more frequently for websites where binary files are removed frequently. For more information please visit our Issue Tracker: issue 015793.

Clean a DFS cluster install from stale DB files

A new script has been added for the purpose of cleaning a DFS cluster install from stale files in DB that do not exist on NFS and the opposite too. Run the following script to clean stale DB files:

bin/php/dfscleanup.php

 Options:

  • -S Check files on DFS share against files in the database
  • -B Checks files in database against files on DFS share
  • -D Delete nonexistent files

It is recommended to first run it WITHOUT the -D switch to see which files are going to be removed. For more information please visit our Issue Tracker: #018508

Note: ANY file located in MountPointPath is likely to be removed. Thus any file that is NOT contained in eZ Publish cluster will be removed if using -D switch. Please read DFS installation guide and issue #19059 for more information.

Ester Heylen (14/09/2010 12:35 pm)

Jérôme Vieilledent (03/04/2012 2:17 pm)

Ester Heylen, Geir Arne Waaler, Jérôme Vieilledent


Comments

There are no comments.