DECTRIS CLOUD SYNC
DECTRIS CLOUD SYNC is a standalone software that automates data upload from your local storage to DECTRIS CLOUD. It runs quietly in the background, keeping an eye on specific folders and sending new files to the cloud as they arrive.
Designed with flexibility in mind, SYNC is easy to integrate into various data infrastructures — whether you’re working on a beamline, a local server, or in the lab.
1. Overview
Once installed and configured, DECTRIS CLOUD SYNC works as a daemon (background service) in the local computer or server that hosts your data locally. The SYNC monitors folders that you specify and uploads any new data files to your lab’s current experiment on DECTRIS CLOUD.
The daemon is linked to a specific lab via a license file, which ensures data is sent to the correct location.
Default Watched Folders
By default, the daemon watches the following directories:
/opt/dectris/cloud_sync/raw
/opt/dectris/cloud_sync/work
/opt/dectris/cloud_sync/metadata
/opt/dectris/cloud_sync/processed
/opt/dectris/cloud_sync/auxiliary
These can be customized or extended in the configuration file (see section 3).
2. Download
The DECTRIS CLOUD SYNC standalone can be downloaded for Linux-based operating systems:
Installation Required:
No installation required – use this option if you don’t have administrator (sudo) rights:
- Standalone binaries (Linux): click to DOWNLOAD.
Note: A valid license is required to upload data using DECTRIS CLOUD SYNC for routing the data to the associated lab and experiment. Please contact us to request or activate your license.
3. Installation
To get started, download the appropriate package for your Linux system above:
- .deb for Debian/Ubuntu-based distributions
- .rpm for RedHat/CentOS-based distributions
(Contact support@dectris.cloud in case you are not able download the packages)
Installation Steps
1 . Install the package : Use your system’s standard package manager:
sudo dpkg -i dectris_cloud_sync.deb
# or
sudo rpm -i dectris_cloud_sync.rpm
4. Configuration
How to configure your DECTRIS CLOUD SYNC to match your needs.
4.1 Configuration File Location
The primary configuration file is a TOML file located at:
/etc/dectris/dectris_sync.conf
4.2 Edit the configuration file
Make sure to adapt the paths listed in the configuration file according to your use case. Mainly make sure to give the correct path to the license file:
license_path = "/path/to/license.lic"
Also, make sure to uncomment and configure the folders to be watched. Below is an example that makes sure that the files added to the folder "/opt/dectris/cloud_sync/raw"
will be uploaded to the raw folder of the Active experiment in the instrument.
# A map of folder configurations
[folder.raw]
path = "/opt/dectris/cloud_sync/raw"
delete_after_upload = false
The delete_after_upload = false
makes sure that the files remain in the watched folder after the upload. Feel free change it to true
if you wish.
5. Start the SYNC
Once the steps above have been performed, you can start the DECTRIS CLOUD SYNC on the Terminal with:
dectris_sync
Once the sync is running, all the files copied to your watched folders will be uploaded to DECTRIS CLOUD.
6. Usage
An overview of what DECTRIS CLOUD SYNC does.
6.1 How the Daemon Works
Once running, the daemon will:
- Monitor folders: The daemon watches all folders specified under
[folder.<label>]
. - Upload new files automatically: Whenever new or modified files appear, it attempts to upload them to DECTRIS CLOUD. The data is assigned to the currently active experiment in the lab configured in your license file.
- (Optional) Deletes files: If
delete_after_upload = true
, the daemon removes files after a successful upload. - (Optional) Manages detectors: If detectors are configured with
enable_fetch = true
, the daemon will actively fetch data from those IPs (if that functionality is available).
Paused Upload: If the data upload to the linked lab is paused (Cockpit or API call), the daemon will not upload new files until the upload is resumed. When the upload is resumed, only new files created from that point forward in the watched folder are synced to DECTRIS CLOUD.
6.2 Viewing Logs
You can monitor SYNC activity in real time:
journalctl -u dectris_sync -f
This will show you upload progress, errors, or any issues the daemon encounters.
6.3 Key Configuration Fields
License Path : Links this uploader to your lab. Without it, uploads won't be routed correctly.
- Key:
license_path
- Type: String (Path)
- Default: None
- Description: Points to the DECTRIS software license file. The license file links this uploader to a specific lab on DECTRIS CLOUD, which determines where your uploaded data will be routed.
User and group settings : Set which user and group the service runs as. This controls file access permissions.
- Key:
run_as_uid
,run_as_gid
- Type: Integer
- Default: 0 (root)
- Description: Controls which OS user/group the daemon runs as. This is useful for specifying permissions.
Detectors : Allows optional integration with detectors to fetch data directly. Enable or disable per detector.
- Key:
[[detector]]
- Type: List of objects
- Fields:
name
(String) – Name/identifier of the detector.ip
(String) – IP address of the detector.enable_fetch
(Boolean) – Enable/disable data fetching from the detector.
Folders : Define folders to monitor according to your preferred data sources.
- Key:
[folder.<folder_label>]
- Type: Map of objects
- Fields:
path
(String/path) – The absolute directory path on the filesystem.delete_after_upload
(Boolean) – Whentrue
, files in this folder are removed after a successful upload.
7. Example Configuration
Here’s a more complete example with multiple folders and detectors:
# /etc/dectris/dectris_sync.conf
# License location (also defines the lab for this uploader)
license_path = "/etc/dectris/license.lic"
# Detectors
[[detector]]
name = "BeamlineDetector01"
ip = "10.1.2.3"
enable_fetch = true
[[detector]]
name = "BeamlineDetector02"
ip = "10.1.2.4"
enable_fetch = false
# Folder configurations
[folder.raw]
path = "/opt/dectris/cloud_sync/raw"
delete_after_upload = false
[folder.processed]
path = "/opt/dectris/cloud_sync/raw"
delete_after_upload = false
[folder.work]
path = "/opt/dectris/cloud_sync/work"
delete_after_upload = false
[folder.metadata]
path = "/opt/dectris/cloud_sync/metadata"
delete_after_upload = false
[folder.auxiliary]
path = "/opt/dectris/cloud_sync/metadata"
delete_after_upload = false
8. Troubleshooting
A few tips ton what to check in case you encounter the issues below:
Service won't start?
- Check your TOML formatting.
- Verify valid
run_as_uid
andrun_as_gid
. - Check logs for error messages:
Files aren't uploading?
- Ensure directories are correctly specified and accessible.
- Check permission settings for the user/group running the daemon.
- Verify that the lab associated with your license file is not in maintenance mode.
Detector fetch not working?
- Verify
ip
is correct andenable_fetch
is true. - Check network connectivity to the specified IP.
Files not deleted after upload?
- Confirm
delete_after_upload = true
in[folder.<label>]
. - Check that uploads complete successfully. Deletion only occurs after successful uploads.
9. Maintenance
Upgrading and uninstalling, as simple as it can be.
To upgrade: Download and install the new .deb
or .rpm
package using the same method as initial installation.
To uninstall: Use your package manager:
sudo apt remove dectris_cloud_sync
# or
sudo yum remove dectris_cloud_sync
Need Help?
If you run into issues, have questions, or would like to request features, feel free to reach out: support@dectriscloud.com