Skip to main content
Version: 4.x

File Distribution

Overview

File distribution pushes files or a directory to many hosts at once and lives under Batch Execution / File Distribution. Two data sources are supported:

  • Local upload: upload one or more files from the browser; Spug stores them temporarily on the server and then distributes them;
  • Host directory: pick a managed host and a directory on it; Spug mounts the directory read-only with sshfs and syncs it to the targets, which is ideal for host-to-host directory synchronization.

File distribution

Steps

  1. In the Data source card click Upload to add local files, or click Select host and enter the directory path (it must exist on that host).
  2. In the Targets card enter the Target path (a directory on the target hosts) and choose one or more Target hosts.
  3. Click Start. The page shows the progress and result of every host in real time; the source list is cleared after a successful run.

Distribution records are cleaned up daily and only the most recent 30 are kept.

Requirements and notes

  • Distribution is based on rsync. The host (or container) running Spug and every target host need rsync, which most Linux distributions ship by default; use batch execution to install it if missing. Host-directory sources additionally need sshfs on the server. The official Docker image contains these dependencies and must run with privileged: true.
  • Files with the same name in the target path are overwritten, so double-check the path.
  • Distribution runs asynchronously; keep the page open while it is in progress.
  • The role needs the Batch Execution / File Distribution permission, and the selectable targets follow the host permissions of the role.
Tip

To combine a distribution with follow-up commands (unpacking, restarting a service) in a repeatable flow, use the Data upload / Data transfer nodes of a pipeline together with an Execute command node.