This documentation is still in progress. We are working hard to update all our screenshots to the new Magnolia 6 style. Please bear with us.
This pages explains how to delete a JCR workspace on a Magnolia system.
JCR API and Jackrabbit
You cannot delete a JCR workspace programmatically with Magnolia. You must delete it manually.Apache Jackrabbit - Frequently Asked Questions.
Deleting a workspace manually
- Note that deletion cannot be reverted.
- Ensure the workspace you want to delete does not contain content you still require.
- Shut down the application server (such as Tomcat) before manually deleting. You cannot delete a workspace on a running system.
There are two main steps involved in deleting a workspace manually:
- Delete the folder
Delete database tables with table names containing the workspace name.
On embedded databases such as H2 you can skip step 2.
Deleting the workspace folder in the repository folder
For every JCR workspace there is a folder on the file system. The value of the
magnolia.repositories.home property defines the location of these folders. Check the value for your system:
- If your system is still running, use the About app to look up the property.
- Alternatively, check the
magnolia.propertiesfiles where the property is defined.
Determine the path for
$magnolia.repositories.home/magnolia/workspaces/$workspace-name and delete the folder.
|Folder to delete|
Deleting database tables
Generally you should delete all tables which contain the JCR workspace name.
Your approach when deleting these tables depends on the persistence layer. Some examples of persistence layers are: Apache Derby, H2, Ingres, MySQL, Oracle and others. The value of the Magnolia property
magnolia.repositories.jackrabbit.config gives an indication of the persistence layer in use.
|Jackrabbit persistence layer||MySQL (Version 14.14, Distribution 5.7.20, for Linux (x86_64))|
|Table names in MySQL DB|
Multiple instances and clustering
Make sure you delete the workspace on both the author instance and on all public instances.