Packager
The Packager module allows you to package content and configuration. A package can contain content from any Magnolia CMS workspace such as websites, image resources and DMS assets. You can also package physical files in the webapp's file system folder. Packages are ideal for backup, installing files on another instance, and replicating content to an instance that you can not access through a subscriber.
- Download
- Installing
- Uninstalling
- Usage
- Creating a package
- Defining properties
- Defining rules
- Downloading a package
- Uploading a package
- Installing a package
- Package status
Download
Download the Packager module from Magnolia Store or Nexus repository.
Installing
Packager is an enterprise module bundled with the Enterprise Edition and typically already installed. Go to Magnolia Store > Installed modules in AdminCentral to check. To install the module individually, see the general module installation instructions.
Uninstalling
See the general module uninstalling instructions and advice.
Usage
Creating a package
To create an empty package:
- Go to Packager menu in AdminCentral.
- Click New.
- Double-click the package name and change
untitledto a more meaningful name. - Double-click the full name and describe the purpose of the package.
Packages are added into their own packages workspace. This allows you to create a package of other packages. This way you can divide a backup into several packages and then collect them into one package.
Defining properties
In an emergency it is important to immediately find the package you want to restore. Provide a meaningful description in package properties. Describe what the package is used for and when to deploy it.
To define package properties:
- Select a package and click Open.
- Click Edit definition.
- On the Properties tab, fill the following fields:
- Package title
- Description. Purpose and usage instructions for a package. For example, "Demo-project pages and DMS assets. Excludes members area. Use to backup and recover the website."
- Restart. Check the box to force automatic restart of the Magnolia instance once the package has been uploaded. This is the case when you upload Java libraries or new dialogs.
- Release notes. Use release notes to identify when in the site lifecycle the package was created. It helps identify the restore point. For example "Release 1.9 before site redesign".
- Click Save.
Defining rules
Defining package rules means selecting the pages, files and folders you wish to include in the package. The content is not added to the package yet, just its location is identified. The adding happens only when you download the package. The download process will read the package rules (nodes/paths) and download the package with the most current content.
To define package rules:
- Select a package and click Open.
- Click Edit definition.
- Go to the Access Control List tab.
- Select a workspace from the drop down list. The list contains all Magnolia CMS workspaces and
fileswhich allows you to browse the webapp directory on the file system. - Include or exclude the item. This is an ACL-like definition. For example, you can include a website but exclude a section of it. When you exclude a node it will be excluded also at install time. This means that excluded nodes will not cause a deletion of target data even if they don't exist in the package. See Installing a package below.
- Select the node only or also all its child nodes.
- Click Choose and select a node from the workspace or file from the file system.
- Optional: Click Add for more rules for the same repository.
- Click Save.

A Web page has more nodes than just the page you see in the browser. Magnolia CMS creates child nodes containing additional information such as meta data and properties. Each paragraph on a page also has its own node and child nodes.
Downloading a package
Downloading means packing content into the package as defined in the rules. The system reads nodes defined in the rules and adds their content in compressed form to a new .mgnl file. The .mgnl file is written to the disk.
To download a package:
- Right-click a package and select Backup.
- Click OK at the confirmation prompt. The system downloads the content and creates the package.
- Save the file to a disk.
<package name>_<yyymmdd>.mgnl, for example demo-project_20110718.mgnl. You can rename the package file.
Uploading a package
Uploading means transferring content from a .mgnl file on a disk to a package in the packager workspace. This does not install the package content onto the system yet.
To upload content to a package:
- Right-click a package.
- Select Upload.
- Browse to the .mgnl file.
- Click Upload.
You can also upload content and create a new package at the same time. Right-click the white space on the Packager page and select Upload.
Installing a package
Installing adds and replaces content in the system with content from the package. The entire node tree in the target workspace is replaced with the node tree in the package. This can mean that nodes that exist in the workspace but not in the package are deleted. For example, if a new site branch was introduced after the package was created, restoring the package will delete the branch.
To install a package:
- Select the uploaded package and click Open.
- Go to the Statistics tab.
- Verify that the changes listed on tab are acceptable. Pay attention to the deleted nodes in particular. See example below.
- Go to the Package tab.
- Click the Install package button to copy the package's content to the site.
This applies only to Magnolia 4.5.8 (Packages module 4.0.8) and later:
For large packages on Linux operating systems change the location of the tmp directory used for uploading to /var/tmp. The location of the tmp directory is set to magnolia.upload.tmpdir=${magnolia.home}/tmp in the magnolia.properties file. You can locate this file at <CATALINA_HOME>/webapps/<contextPath>/WEB-INF/config/default/magnolia.properties. Packages can be large and many Linux systems use RAM-backed /tmp file systems of only a few gigabytes. Linux recommends using /tmp for small temporary files and /var/tmp for large ones.
Example
On the Statistics tab you see that 2 nodes will be deleted! A new page /website/demo-project/about/subsection-articles/new-article was created after the package backup was taken. The page and associated metadata nodes will be deleted when the package is installed. After installing the package you will have the same nodes that existed at the time the package was downloaded.
