DECTRIS CLOUD SYNC

DECTRIS CLOUD SYNC is a standalone software that automates data upload 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). It monitors the folders 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. Installation

To get started, download the appropriate package for your Linux system using the download link provided by DECTRIS:

  • .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

2. Enable and start the service (recommended method)

sudo systemctl enable dectris_sync
sudo systemctl start dectris_sync

3. Check service status

sudo systemctl status dectris_sync

Alternatively, you can run the service manually if needed.


3. Configuration

How to configure your DECTRIS CLOUD SYNC to match your needs.

3.1 Configuration File Location

The primary configuration file is a TOML file located at:

/etc/dectris/dectris_sync.conf

If you make any changes to this file, make sure to restart the service:

sudo systemctl restart dectris_sync

 

3.2 Configuration File Explained

Here is an example configuration file with helpful comments:

# /etc/dectris/dectris_sync.conf

# Optional path to a license file (this file may link the uploader to a specific lab)
license_path = "/path/to/license.lic"

# The UID and GID under which the daemon will run
run_as_uid = 1001
run_as_gid = 1001

# A list of detector configurations (optional)
[[detector]]
name = "Detector_A"
ip = "192.168.1.100"
enable_fetch = true

[[detector]]
name = "Detector_B"
ip = "192.168.1.101"
enable_fetch = false

# A map of folder configurations
[folder.raw]
path = "/opt/dectris/cloud_sync/raw"
delete_after_upload = false

[folder.metadata]
path = "/opt/dectris/cloud_sync/metadata"
delete_after_upload = false

[folder.my_custom_folder]
path = "/mnt/custom_data_folder"
delete_after_upload = true

 

3.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) – When true, files in this folder are removed after a successful upload.

4. Usage

An overview of what DECTRIS CLOUD SYNC does.

4.1 How the Daemon Works
Once running, the daemon will:

  1. Monitor folders: The daemon watches all folders specified under [folder.<label>].
  2. 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.
  3. (Optional) Deletes files: If delete_after_upload = true, the daemon removes files after a successful upload.
  4. (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.

4.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.


5. 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"

# Run the daemon under a specific user/group
run_as_uid = 1002
run_as_gid = 1002

# 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.work]
path = "/opt/dectris/cloud_sync/work"
delete_after_upload = false

[folder.metadata]
path = "/opt/dectris/cloud_sync/metadata"
delete_after_upload = false

[folder.archived]
path = "/mnt/archived_data"
delete_after_upload = true

6. 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 and run_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 and enable_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.

7. 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
 

 

Was this article helpful?