Dear LXD-Team,
would it be possible to add the functionality that lxc import
could read from stdin?
My use case is, that I pipe the backup directly to the archive, e.g.:
lxc export --compression none --instance-only foo - | borg backup create myArchive::{now} -
That is already working fine, as the export class already had the “write to stdout” functionality. But the import class is missing the opposite “read from stdin” function.
(see https://github.com/lxc/lxd/blob/e86e1f8f7837ada83402bcc891ace8f5f8cfcd18/lxc/export.go#L129)
Now to restore that backup I have to first write it to a file and then execute ´lxc import myFile.tar´ which is a superfluous step.
When dealing with large containers, every time and disk space consuming copy operation hurts.