docs
  1. SCAYLE Resource Center
  2. User Guide
  3. SETTINGS
  4. Data Replication
  5. Overview

Overview

Introduction

The data replication feature is a powerful tool that facilitates the seamless transfer of data between different environments, such as from a preview environment to a live or test environment. This feature ensures that your data is accurately and efficiently moved, maintaining consistency and integrity throughout the process.

Data replication operates by initiating an export (backup) of the selected data-replication tasks. Once all export tasks are successfully completed, the import process is triggered. To ensure the reliability of the import, an additional export is created in the target environment prior to the actual import. This export serves as a rollback mechanism in case one or more import tasks fail, providing a safety net to revert to the previous state if needed.

Process of replicate data from acme-test into acme-live.

To minimize the risk of conflicts and ensure smooth operations, only one data replication job can be run per environment at any given time. This restriction helps to prevent parallel jobs from interfering with each other, maintaining a stable and predictable replication process.

The replication strategy for each task is predetermined, ensuring that all necessary IDs, which may be used by tenants, remain consistent between the source and target environments. For example, an attribute_group with an ID of 123 in the source environment will retain the same ID in the target environment, although sub-relations not used by the tenants may change.

For detailed information on the types of data that can be replicated, refer to the section on Data Set Types. This section provides a comprehensive list of data types supported by the data replication feature, helping you understand what can be moved and how it will be handled during the replication process.

By following this guide, you will be equipped to effectively use the data replication feature, ensuring your data is accurately transferred, and your environments are consistently updated.

Data replication is a tool for advanced users and requires an understanding of dependencies and data flows. A verification step is required from a user with the same permissions for additional security.

Manage Data Replication

Data Replications will be deleted automatically
- Export failed after 30 days
- Import failed after 90 days
- Rollback failed after 120 days
- Succeeded after 120 days

List

Located under Settings > Data Replication, the Data Replication Listing page provides a comprehensive table displaying all critical information related to data replication processes. The table includes details such as the tasks involved, source environment, creator, approver, shop, status, and timestamps for key events like creation, approval, start, and completion.

To access this page, users must have the data-replication__list permission. The listing page also features a search functionality, enabling users to easily find specific replication records based on their needs. Ensure to review the status and details of each replication process for accurate tracking and management.

Create

On this page, you can set up data replication processes by selecting specific tasks, choosing the target shop, and assigning an approver. To initiate a replication, you must have the data-replication__update permission. Once submitted, the replication request will be reviewed and approved before execution. Ensure all selections are accurate to streamline the process and maintain data integrity.

Use Data replication feature

  1. Log in to the target environment where the changes should be applied.
  2. Navigate to Settings > Data replication.
  3. Press the Button NEW DATA REPLICATION on the top right.
  4. Select the Source System where the data is exported from.
  5. In the Select Data for Replication section, choose from our Data Sets.
  6. In the Double Confirmation section, choose a user to approve.
    The replication creator cannot select himself/herself as approver
  7. Click GET APPROVAL.
  8. The reviewer is notified by email.

Once the data replication has been submitted for approval, its status changes to APPROVAL NEEDED. It is possible to have multiple data replications in approval state, but only one can be executed at the time.

The creator cannot also be the approver for security reasons.

Approve

The Data Replication Approval page provides a detailed summary of the data replication request. This page mirrors the information from the Creation Form, including selected tasks, source environment, shop, creator, and assigned approver.

Here, the assigned approver can review all the details of the replication request. The page includes action buttons for decision-making: “Decline” to reject the request and “Approve & Start Replication” to authorize and initiate the replication process. This ensures that all data replications are thoroughly reviewed and approved before proceeding, maintaining data integrity and security.

The creator cannot also be the approver for security reasons.

Details

The Data Replication Detail Page provides a comprehensive view of each replication task’s status using a linear timeline, despite the asynchronous nature of the tasks. The timeline distinctly separates export, import and rollback tasks, displaying the sequence in which export tasks must all succeed before any import tasks can begin.

Each task, whether import or export, is selectable on the timeline and consists of two main sections: “System Messages” and “Logs.”

System Messages

This section displays the event messages associated with each task. Every replication task includes at least five key messages, providing a detailed account of the process:

1. exportTriggered - The export process has been initiated.

2. exportStarted - The export is confirmed and the process has begun.

3. exportChunkStarted - A specific portion of the data export has started. Can be one or many

4. exportChunkFailed or exportChunkCompleted - Indicates whether the specific portion of the export succeeded or failed.

5. exportCompleted - The export process has finished successfully.

Additionally, if a task is aborted due to unmet preconditions, the message exportAborted/importAborted is displayed immediately after exportTriggered/importTriggered, indicating that the task was not processed. Each system message includes a Trace ID for tracking purposes and provides a human-readable error message that clearly explains the event.

Logs

The “Logs” section provides a chronological list of all human-readable log messages, offering further insights into the replication process. These logs include detailed descriptions and additional context to help users understand the events and any issues that may have arisen.

This detailed view enables users to track the progress and status of each task within the replication process, ensuring transparency and clarity throughout the data replication workflow.

Rollback

In the context of the data replication process, there are two types of rollback mechanisms: automated and manual. These mechanisms ensure that data integrity is maintained and necessary corrections can be made if issues arise during replication.

Automated Rollback

The automated rollback is triggered automatically when all import tasks are completed and at least one of these tasks has a status of “failed.” In this case, an automatic rollback process is initiated, which resets all changes in the target environment. This is done by restoring from the backup created in the target environment before the import started. This backup mechanism ensures that all data can be reverted to the state before the replication process began.

As the rollback is a critical change to the data, our core teams closely monitor these processes and respond immediately to any errors. This monitoring ensures that any issues are addressed promptly, and that data integrity is preserved.

At the end of the process, it is also possible to manually initiate a rollback if the overall status of the replication is not “successful.” However, this manual rollback option is only mentioned here briefly, as it serves as a secondary measure to the automated process.

Rollback limitations

Data Sets that will not be rolled back in case their replication was successful:

  • Attribute Groups
  • Translations
  • Master Categories
  • Search Configuration
  • Shop Categories

Exceptions

Data Set: Roles

In case of a rollback of Roles, the replicated data will not be removed from the target environment but the former configurations will be re-added additionally to the replicated ones.

This means that by rolling back the Data Set Roles, it is not possible to reinstall the state that was present on the target environment before the data replication was initiated.