Uploading a file to remote devices
With qbee it is possible to play out one or many files to individual target devices or groups of devices. The function used for this is file distribution. Please upload your files or scripts with the qbee file manager and follow the following steps:
Upload any files with the file manager. Please note the paths.
In the qbee app go to "Configure" and select "System->File Distribution".
On the device tab select the group or device that should receive the files. For more information please see the configuration management documentation.
Start the actual file distribution:
This plays out the file/files to the remote devices.
When does this file get distributed?
qbee checks if the file exists in the defined destination. If not it will be transferred. Both the file in the file manager and the file on the machine has a checksum. If the file manager file is replaced a new file distribution happens. Likewise, if the file on the target machine is changed this will also trigger a new file download and the changes will be overwritten with the original file from the file manager. The checksum investigates content, not time, permissions or ownership.
This behaviour is very useful. But if a process on the target device is working against a file that is watched by qbee file distribution this can cause continuous file downloads. This will be seen in the logs.
The input screen of the file distribution function looks as follows:
The qbee file distribution is a very powerful mechanism. Therefore, there are some things to consider when using it:
- the agent tries to write the file in the user context of the target directory and will try to apply a suitable file permission flag. If a file is written to the pi user on a Raspberry Pi the file is adjusted such that it is readable by the pi user. Please check if your file has the correct file permissions. If not, they can be adjusted with a "command to run" which is triggered any time the file is written again. Just use the correct
- It is possible to add more than one "file source" - "file destination" pair within one command to run block. So it is possible to use one as a trigger for an action. Please see in learning how to run a script once how that can be done.
- Multiple file distributions can be chained behind each other by just adding new file distributions with the plus signs
- The order of execution is defined by the order in the UI. The first file distribution will be executed first before moving to the next one.
We are currently working on a redesign of the user interface. This will be much improved and much easier to operate in the future.
If you want to learn more about the command to run or templating options please visit the distributing and running scripts section.