Refactor podman export to work with the remote client

Previously, our approach was to inspect the volume, grab its
mountpoint, and tar that up, all in the CLI code. There's no
reason why that has to be in the CLI - if we move it into
Libpod, and add a REST endpoint to stream the tar, we can
enable it for the remote client as well.

As a bonus, previously, we could not properly handle volumes that
needed to be mounted. Now, we can mount the volume if necessary,
and as such export works with more types of volumes, including
volume drivers.

Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
Matt Heon
2025-06-14 07:22:51 -04:00
parent f69f92cdf7
commit 63bf454d66
11 changed files with 155 additions and 58 deletions

View File

@@ -116,4 +116,5 @@ type ContainerEngine interface { //nolint:interfacebloat
VolumeRm(ctx context.Context, namesOrIds []string, opts VolumeRmOptions) ([]*VolumeRmReport, error)
VolumeUnmount(ctx context.Context, namesOrIds []string) ([]*VolumeUnmountReport, error)
VolumeReload(ctx context.Context) (*VolumeReloadReport, error)
VolumeExport(ctx context.Context, nameOrID string, options VolumeExportOptions) error
}