Product SiteDocumentation Site

6.2. Cleanup

To keep the archive synchonised with primary stores after items are deleted from the primary store, start the archiver in cleanup mode. This is a separate operation from archiving. Since cleanup may be a long process, it is recommended to run it less often than archive operations.
When zarafa-archiver performs a cleanup run in which it encounters messages that exist in an archive and for which in main store a stub used to present which has now been deleted, it will remove the message from the archive. This is useful to avoid the situation that archived messages exist which have properties set that indicate that they are stubbed, while no corresponding stub exists in main(store.)
What happens to such archived messages depends on configuration:
  1. cleanup_action is set to delete. In this case messages for which no stubs exist will be removed from the archive.
  2. cleanup_action is set to store. In this case messages for which no stubs exist will be moved to a folder named Zarafa Archive\Deleted.

注意

Archiver can remove soft deleted items from the main store (or stores) for which a cleanup run is performed. This avoids the situation in which soft deleted stubs may be restored for which the archived versions no longer exist. To enable this feature, configuration item purge_soft_deleted must be set to yes. See chapter 10.1. Softdelete restore in the The Administrator Manual for more information on soft deleted items.

6.2.1. From the command-line

The following command performs a cleanup for all users:
zarafa-archiver -C
Passing option --local-only to zarafa-archiver causes it to cleanup only archives of users who have a store on the server to which zarafa-archiver is connected. This is the server on which zarafa-archiver is executed unless otherwise configured in the configuration file.
zarafa-archiver -C --local-only
It’​s also possible to explicitly specify which users archive to cleanup:
zarafa-archiver -u <user name> -C
It’​s recommended to perform the cleanup run once a week. This can be done by adding the following line to /etc/crontab.
0 3 * * 0 root [ -x /usr/bin/zarafa-archiver ] && /usr/bin/zarafa-archiver -C
This will clean up all archives every sunday at 3:00 am.