Creating a new public instance

Multiple public instances are useful when you want to:

  • Publish one part of a site to a different public instance.

  • Manage multiple sites in one author instances and publish each site to a dedicated public instance.

  • Add more public instances to cope with a high load.

  • Add more public instances to ensure high-availability.

You must have a DX Core license to be able to configure multiple working public instances.

Copying a public instance

The simplest way is to create a new public instance is to copy an existing one.

Before you do this, back up the webapps folder and the database. There is always the risk of corrupting the existing instance.
  1. Stop both your Public and Author instances.

  2. Copy a public instance folder such as magnoliaPublic. If you use an external database such as MySQL, copy the database folder too.

  3. Rename the copied folder to magnoliaPublic2.

  4. Delete unnecessary subfolders from the copy. The copy is a clone of the source instance. Some folders are essential to the new instance but others can be deleted.

    • OK to delete:

      • cache, contains cached entries of the original instance.

      • logs, contains log entries of the original instance. Empty log files will be recreated during server startup.

      • index subfolders in each /repositories/magnolia/workspaces/* folder. Deleting the subfolders reindexes the repositories. The rest of the repositories folders should remain intact.

      • tmp, a temporary folder which Tomcat or Jackrabbit uses for its processes during export/import.

    • Do not delete:

      • docroot, contains the Tomcat docBase static resources.

      • META-INF

      • templates, contains static resources.

      • WEB-INF

  5. If you use an external database such as MySQL, connect the new instance to its database location. Edit the Jackrabbit configuration XML file in /webapps/magnoliaPublic2/WEB-INF/config/repo-conf. Each database has a file of its own, edit the file that you have configured in magnolia.properties in the magnolia.repositories.jackrabbit.config parameter. For example, if you use MySQL, then edit jackrabbit-bundle-mysql-search.xml.

    Add the connection information twice: Once for the workspace section and once for the versioning section in the XML file.

    You can also include a custom XML configuration file for your database. For more information, see Content storage and structure and Configuration.

  6. If you use an external database, set the persistence manager also for each workspace. Workspace configuration XML files are in /<contextPath>/repositories/magnolia/workspaces/<workspace>/workspace.xml.

  7. Start Magnolia.

  8. Update the existing MicroProfile receiver configuration:

    magnolia.publishing.receivers[0].name=magnoliaPublic8080
    magnolia.publishing.receivers[0].url=http://localhost:8080/magnoliaPublic
    magnolia.publishing.receivers[0].enabled=true
    magnolia.publishing.receivers[1].name=magnoliaPublicTwo8080
    magnolia.publishing.receivers[1].url=http://localhost:8080/magnoliaPublic2
    magnolia.publishing.receivers[1].enabled=true

Other ways to create a public instance

  • Backup module. Use the Restore function. This creates a new public instance for the restored data automatically.

  • Synchronization module. Create new public instances without shutting down existing ones.

  • Programmatically by writing a cloneInstanceCommand.

  • Jackrabbit DataStore for blobs in special cases.

Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules
6.3 beta
X

Magnolia 6.3 beta

Magnolia 6.3 is in beta. We are updating docs based on development and feedback. Consider the 6.3 docs currently in a state of progress and not final.

We are working on some 6.3-beta known issues during this phase.