RemoteStorage

Defined in dccd.daemon.storage

class RemoteStorage(config)[source]

Bases: object

Push local data directories to remote destinations via rclone.

If no remotes are configured, push is a silent no-op and data is kept on the daemon host only.

Parameters:
configStorageConfig

Storage configuration (local path + optional rclone remotes).

check_rclone()[source]

Check whether rclone is available in PATH (result is cached).

Returns:
bool

True if rclone is found, False otherwise.

push(local_path)[source]

Copy local_path to all configured remote destinations.

The remote target mirrors the relative directory structure under config.local_path. For example, if local_path is /data/crypto/Binance and config.local_path is /data/crypto, the target will be <remote>/Binance. If local_path equals config.local_path (root sync), the contents are copied directly into each remote root.

Parameters:
local_pathstr or pathlib.Path

Absolute path of the directory to synchronise.

Notes

This method never raises — failures are logged as errors so that a remote-push failure does not interrupt the local collection loop.