balena scp command

Hi,

One of the things our team needs to do fairly often is copying files to a device. While there is a way to do this with SSH tunneling, it is quite clunky and not very user-friendly. It would be great to have a balena scp command in the CLI which allows easy copying of a file into a container in a more user-friendly way, e.g. by device UUID and desired service, while hiding all the tunneling complexity from the user.

A simple web interface to do the same thing would also be very nice, but not as important.

Hi! Could you please share your use case for copying files directly to the containers?

Ideally, we aim to enable users to manage entire fleets seamlessly without needing manual, one-by-one device interventions. Knowing what you’re working on will help us figure out the best path forward here

For us it would primarily be useful during prototyping and development. We have various device-specific configuration files that sometimes need updating. We are also using custom firmware for some of the device peripherals. During development it would be useful to be able to easily upload a file (e.g. a firmware image) to a single device to be able to test this custom firmware on prototype devices in the field (which are not easily accessible), before finalising and sending it through our deployment pipelines for wider deployment.

We run into this occasionally as well. Our use case is usually a single customer with a device issue that requires our tier 3 support to pull detailed logs from a specific service/container on the device. We may eventually build in an automatic upload features so the device pushes the logs to our support team, but for now someone manually logs into the device and has to zip and transfer the logs.

We do this today using Croc, which works well but it is another tool to install and manage.

FWIW, I’ve also done experimenting with using Pyinfra via a custom balena connector (that uses the balena CLI SSH support) to make bulk changes to remote devices. I thought it might be an interesting extension/evolution of the configizer. Some basic stuff is working and I’m happy to share it if folks are interested.

-mike

This is the canonical issue/comment for this feature request:

Cheers!