Appearance
Dataplicity File Transfer is a robust, resilient method to download files from devices with periodic, poor or otherwise limited connectivity.
How it works
With Dataplicity File Transfer, you can request a file download in advance, and Dataplicity will take care of the rest. Even if your device turns up once a week for long enough to upload just a few kilobytes of data each time, we'll eventually compile the whole file and make it available to you.
Dataplicity will periodically request an index of files in /home/dataplicity/remote. This index will be stored on Dataplicity for use when you request a file from that index (whether or not that device is online). Once a file is requested, Dataplicity will retrieve chunks of the intended file over time, stitch the chunks together as they arrive, and return the completed file to you once all the chunks are available.
A local snapshot of the file is taken at the start of the transfer to ensure that files, such as log files, that are open for append at the time of the request, arrive in a coherent state in the end.
Before proceeding
Confirm that File Transfer is available for your organisation and agent release. See Agent upgrade and removal.
Accessing files outside of /home/dataplicity/remote
By default, Dataplicity File Transfer uses /home/dataplicity/remote. The standard installer runs the interactive agent as the unprivileged dataplicity user, so file operations are also bounded by that account's Linux permissions. Files in /root/ are not normally accessible to it. Custom service identities, groups, ACLs, or ownership can change this boundary.
To make an additional file available, prefer copying the specific file into /home/dataplicity/remote with appropriately narrow ownership and permissions.
Copy:
shell
cp <filename> /home/dataplicity/remote/Avoid broad directory links and world-readable permission changes. If copying is unsuitable, use a narrowly scoped group or ACL and review it as a security-sensitive change. See the device-side privilege boundary.
Transfer files from intermittently connected devices
Dataplicity File Transfer keeps retrieving file chunks as an intermittently connected device comes online, then assembles the completed file for you. Use it for devices that connect briefly or unpredictably, and use remote shell for interactive diagnostics.