Page tree
Skip to end of metadata
Go to start of metadata

The Content Synchronization Module is used to get content from a source instance into a target instance. For example, you can get content from a PRODuction environment sync'ed (i.e. pulled) into a TEST environment.

When having a full DTAP environment in place for a customer and developing nice new things and improving existing functionality, often there is the need for 'actual' content to properly test all kinds of changes. This modules will save time to have all content exported and imported manually.

To start synchronization with the app, make sure all needed workspaces and nodes are configured, enter the credentials of a user that has all needed permissions on both source and target, and then click the button 'START SYNCHRONISATION'.

This module has to be installed on both source and target instance to work. Workspaces as well as nodes can both be synchronised in one go. Configuration is stored in JCR and done in node /modules/content-synchronisation/config/.

Synchronization first removes configured workspaces/nodes on the target instance, then pulls content from source instance. After synchronization, all imported content is published. Synchronization works in a PULL manner, so it imports content to the instance where user starts it. It does NOT push anything.






Installation


This module requires Enterprise Edition of Magnolia. The module can be added as a Maven dependency in the main and webapp POM file:

<dependency>
    <groupId>nl.info.magnolia</groupId>
    <artifactId>content-synchronization</artifactId>
    <version>{moduleVersion}</version>
</dependency>

Additionally a dependency from your main module descriptor is necessary:

<dependency>
    <name>content-synchronization</name>
    <version>{2/* | 3/*}</version>
</dependency>

Versions and compatibility table

Compatibility

Module VersionMagnolia Version
3.0.x5.7.x
2.0.x5.6.x
1.0.x5.5.x

*Version 1.0.x is no longer supported

History

  •  Version 3.0.0: first public release for Magnolia 5.7.x


  • Version 2.0.22: bugfix - removal of parent pom
  • Version 2.0.21: first public release for Magnolia 5.6.x


  • Version 1.0.18: bugfix - removal of parent pom
  • Version 1.0.17: first public release for Magnolia 5.5.x



Configuration


This module has to be installed on both source and target instance to work. Workspaces as well as nodes can both be synchronised in one go. Configuration is stored in JCR and done in node /modules/content-synchronisation/config/. Please remember that rest role (or any other that is going to be used) should be configured correctly and should be allowed for GET/POST in the endpoint /.rest/content-synchronization/v1*



Logger configuration


To write all module logs to separate log file, please add Log4j config to your project:

<appender name="sync-log-content-synchronization" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="${magnolia.logs.dir}/magnolia-content-synchronization.log"/>
    <param name="MaxFileSize" value="1MB"/>
    <param name="MaxBackupIndex" value="5"/>
    <param name="Append" value="true"/>
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%-5p  %d{dd.MM.yyyy HH:mm:ss} %m%n"/>
    </layout>
</appender>
<appender name="log-content-synchronization" class="org.apache.log4j.AsyncAppender">
    <appender-ref ref="sync-log-content-synchronization"/>
</appender>
<category name="nl.info.magnolia.sync" additivity="false">
    <appender-ref ref="log-content-synchronization"/>
    <priority value="INFO"/>
</category> 

User credentials

The user that you use needs to have the next permissions:

  1. read/write permissions on selected workspaces/nodes of target instance
  2. read permission on selected workspaces/nodes of source instance
  3. and permission to access REST endpoint on source instance



Licensing

Content Synchronization module for Magnolia CMS Copyright (C) 2018 info.nl

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.



Contributions, questions or findings

Please share your ideas or questions in the comments area on this page.

If you run into a problem, you can report it here: https://jira.magnolia-cms.com/projects/CONTSYNC



  • No labels

2 Comments

  1. Cool module! Can't seem to find the GIT repo on magnolia forge, and don't have access to the info.nl Bitbucket server. I'd like to fork the module if it is allowed to do so to solve the following issues:

    • Bug when synchronizing resources workspace
    • Can't synchronize DAM workspace due to size of content

    Please let me know if I can access the source code repository...

    1. Hi Richard, thxz for your enthusiasm!

      We were looking last week into sharing the code with you. Since you would be the first external in our GIT repo, we have to plan putting time into configuring that properly and make sure all other projects are still hidden.

      Are you OK in raising a JIRA issue/finding https://jira.magnolia-cms.com/projects/CONTSYNC for the bug you've found? Fixing the bug in our version will help others as well.

      About the assets sync. Indeed the size is a problem that we would like to fix.