# System synchronization
# What is system synchronization?
With the feature "system synchronization", properties of one 4ALLPORTAL can be transferred to another 4ALLPORTAL. You can synchronize apps, configuration files of your custom folder and the role configurations.
The feature "system synchronization" is part of the product standard of the 4APP "Core Engine" (4allportal-core) from version 3.6 onwards.
# When do I need system synchronization?
If, for example, a demo- or test-system has been set up, system synchronization is a quick and easy way to transfer the apps and the custom configurations to a target system. It replaces a manual collecting and transferring of files and roles to the target system.
A wizard in the administration area guides you through synchronization.
# How does system synchronization work?
- Using system synchronization, the client (web browser) connects two 4ALLPORTALs. You always run the feature in the target system.
- After a successful connection with a source system, the target system makes a request to the source system. The feature compares the two systems for differences in the installed apps, the configuration files of the custom folder, and the role configurations.
- The identified differences between the two systems will then be shown to you. You can now compare and select the files and roles you want to synchronize.
- The client takes your choice and makes a GET-request to the source system. A zip-file with all selected components will be created in the background and then transferred via POST to the target system.
- The target system unpacks the zip-file, replacing the current apps and (role) configurations with those from the source system.
Note: A backup will be created only of the current configurations of the target system, not of the apps or role configurations.
# Requirements / SSL and CORS
The communication between the two systems takes place only via the client and can therefore be hindered by the individual security settings of your browser.
A system using HTTPS cannot communicate with a system using HTTP. Synchronization can also be restricted by the same-origin policy.
So before using the feature, make sure your browser can communicate with both systems:
- If necessary, configure your browser (e.g. set it to "insecure" for the time of system synchronization)
- Enable CORS and allow cross-origin-requests
To enable CORS, go to the admin snap-in General system configurations/System settings/Security
in your source system and add the complete URL (including port) of your taget system to the field CORS allowed origins. Clear the configuration cache once.
# If you use Docker
If your source system was set up with Docker, you can enable CORS in it like this:
- Look into your Docker folder and open the file "docker-compose.yml"
- Look for "environment" and add the following lines at any position:
ALLOWED_ORIGINS: "http://example.net"
ALLOWED_METHODS: GET, HEAD, POST, PUT, DELETE, CONNECT, TRACE, PATCH
ALLOWED_HEADERS: Content-Type, content-range
- Add the target system(s) which are allowed to access this 4ALLPORTAL to
ALLOWED_ORIGINS
. You can separate more than one origin with commas. Example:
ALLOWED_ORIGINS: "http://localhost,http://localhost.4allportal.net,http://www.example.net"
Attention: Demo- or test-systems (set up with Docker) mostly use HTTP. Ensure that the communication with the target system (possibly HTTPS) is guaranteed.
# Information on data privacy
When using the feature system synchronization, you allow one system to get access to another system and to transfer data. Note that personal or sensitive data may also be exchanged. This depends on the individual content of the synchronized system components:
- installed apps
- configuration files of your custom folder
- role configurations
Example 1: configurations (custom folder)
In some cases, the credentials for a third party software are stored in the configuration files. For example, if the Typo3- or Drupal-connector has been installed on the source system, the stored credentials will be transferred to the target system.
Example 2: role configurations
It is possible that the sql-conditions set for a specific role can contain personal data. For example, if you set sql-conditions in order to hide some folders in the folder structure, the listed folders may contain personal data (e.g. "John_Doe_11-8-1970"). These conditions will be transferred to the target system as part of the role configurations.
# Starting system synchronization
Start the feature in the target system using the admin snap-in General system configurations/System settings/System synchronization.
A wizard will guide you through synchronization in six steps:
# 1. System
Enter the URL for the source system from which you want to transfer the apps and configurations, e.g the URL of a test-system.
# 2. Authentication
Enter the credentials (must be an administrator) for the source system.
# 3. Apps
You now see a list of apps from the source system which differ from the target system. You can compare the version and see whether it is more up-to-date than the app of the target system or has not yet been installed.
Select the app(s) you want to transfer to the target system by checking the checkboxes.
# 4. Configuration
You now see a folder structure with all contents of the custom folder from the source system which differ from the target system.
Select the configuration file(s) or folder(s) you want to transfer to the target system by checking the checkboxes.
Note: For the current configurations of the target system, a backup will be created automatically during synchronization. You will then find it under App Management/Backups
.
# 5. Roles
You now see all roles and child roles from the source system which differ from the target system.
Select the role(s) you want to transfer to the target system by checking the checkboxes.
Attention: No backup will be created for the current role configurations of the target system. As soon as you start synchronization, all former role configurations will be overwritten.
# 6. Synchronization
You now see a summary of all selected apps, configurations and roles. If you want to change something, just click the back-arrow in the bottom left corner. Or return directly to where you want to revise your selection by clicking the corresponding step at the top of the wizard.
If your selection is final, click "Start system synchronization" to start the process.
# Restart
Go to General system configurations/System settings/Maintenance
and restart the target system to activate all changes.
# Troubleshooting
Currently, the transferred zip-folder cannot be larger than 100 MB.
So, if your synchronization was not successful, try excluding larger apps (e.g. CoreEngine, Desktop App or Color Detection) from synchronization and update or adjust them manually.