Open cyqsimon opened 4 months ago
Interested in opening a PR?
Interested in opening a PR?
I would if I am proficient in Golang, which unfortunately I'm not. At least not yet. If anyone is interested in claiming this please go ahead.
The "easiest" would be to add the compression flag (-C
) to the scp command...
https://github.com/containers/common/blob/v0.59/pkg/ssh/ssh.go#L51
-C Requests compression of all data (including stdin, stdout, stderr, and data for forwarded X11, TCP and
UNIX-domain connections). The compression algorithm is the same used by gzip(1). Compression is desir‐
able on modem lines and other slow connections, but will only slow down things on fast networks. The
default value can be set on a host-by-host basis in the configuration files; see the Compression option.
When using the native (not golang) ssh, it should be possible to set in config?
A friendly reminder that this issue had no activity for 30 days.
If no one else had one in progress, I'd be interested to try to submit a PR for this since I was also looking into #23297 which is similar.
It's all yours.
I have a WIP commit for this issue at #24211. It will need to be refined and split into several PRs, but I would appreciate any feedback from those interested here :)
Feature request description
When using
podman image scp
to transfer images between hosts, I noticed that the image is copied over the network as is without any compression:However, if I do
podman save <IMAGE> | zstd -o my-image.tar.zst
, the compressed package often comes out to just about 1/3 the size:I can then transfer this file over the network manually and
podman load -i my-image.tar.zst
on the remote host.Given the significant data savings, I find it odd that
podman image scp
does not support such a compression option.Suggest potential solution
Add a
-c|--compress
option topodman image scp
to perform compression and decompression on the fly, with optionally the ability to pick a compression algorithm.Have you considered any alternatives?
podman save | zstd
+podman load
as described above, but it seems to me that there is no reason this couldn't be streamlined/automated.Additional context
No response