-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
volumes: Add support for volume export
which allows exporting content to external path.
#11290
Conversation
ece50d3
to
5519bf4
Compare
@mheon PTAL |
5519bf4
to
de8d25c
Compare
cmd/podman/volumes/export.go
Outdated
|
||
Allow content of volume to be exported into external tar.` | ||
exportCommand = &cobra.Command{ | ||
Use: "export [options]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is wrong
Use: "export [options]", | |
Use: "[options] VOLUME", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Luap99 this is needed for correct formatting of podman volume --help
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, yes export
has to stay my bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VOLUME part is missing, this is causing the completion test to fail.
e0c6d59
to
c25d2ad
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c25d2ad
to
2580f8f
Compare
Once this feature is created, you will need to write a blog on it. Are you planning |
2580f8f
to
757d652
Compare
@rhatdan yes |
23791da
to
33370b2
Compare
cmd/podman/volumes/export.go
Outdated
flags := exportCommand.Flags() | ||
|
||
outputFlagName := "output" | ||
flags.StringVarP(&cliExportOpts.Output, outputFlagName, "o", "/dev/stdout", "Output=[path]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use /dev/stdout
as path. This will fail on windows. Actually looking at this this will not work with podman-remote at all, right? I think not supporting remote would be fine but we should disable this command on the remote cleint and document this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, no need for remote support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Luap99 Yes we cant have this on remote-client. Do you still think we should not use /dev/stdout
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/dev/stdout is fine if we only support linux.
Look here how to disable to command on the remote client:
podman/cmd/podman/networks/reload.go
Line 18 in 7d8650c
Annotations: map[string]string{registry.EngineMode: registry.ABIMode}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Luap99 linux or *nix. I disabled it via !registry.IsRemote()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the Annotation and not use !registry.IsRemote()
This should be consistent with the other commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Luap99 Yes annotation seems cleaner switched to annotation, PTAL.
33370b2
to
03fb246
Compare
be0c5a6
to
a11850b
Compare
375b7fa
to
446c0bc
Compare
7c34dd1
to
fde9ce7
Compare
fde9ce7
to
86803e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
One last thing otherwise LGTM |
Adds support for transferring data between systems and backing up systems. Use cases: recover from disasters or move data between machines. Signed-off-by: flouthoc <[email protected]>
86803e2
to
edddfe8
Compare
/lgtm |
Adds support for transferring data between systems and backing up systems via exporting volume content to external specified tar.
Use cases: Recover from disasters or move data between machines.