summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-07-28 14:48:28 +0200
committerGitHub <noreply@github.com>2021-07-28 14:48:28 +0200
commit6c5966cf3cbfa15602ba2d9ef57284f2669a321d (patch)
tree452db7496ba00a2e0da6ff4fce77b27a93fa7c12 /cmd/podman
parenta5de8314188d7376f645d8ac6c6f7a6f685b6a45 (diff)
parent60b9e8c0da683d253f3828f00442fc5a75540368 (diff)
downloadpodman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.tar.gz
podman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.tar.bz2
podman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.zip
Merge pull request #10910 from adrianreber/2021-07-12-checkpoint-restore-into-pod
Add support for checkpoint/restore into and out of pods
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/restore.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/containers/restore.go b/cmd/podman/containers/restore.go
index b908ea493..3b6f74efa 100644
--- a/cmd/podman/containers/restore.go
+++ b/cmd/podman/containers/restore.go
@@ -71,6 +71,9 @@ func init() {
)
_ = restoreCommand.RegisterFlagCompletionFunc("publish", completion.AutocompleteNone)
+ flags.StringVar(&restoreOptions.Pod, "pod", "", "Restore container into existing Pod (only works with --import)")
+ _ = restoreCommand.RegisterFlagCompletionFunc("pod", common.AutocompletePodsRunning)
+
validate.AddLatestFlag(restoreCommand, &restoreOptions.Latest)
}
@@ -91,6 +94,9 @@ func restore(cmd *cobra.Command, args []string) error {
if restoreOptions.Import == "" && restoreOptions.Name != "" {
return errors.Errorf("--name can only be used with --import")
}
+ if restoreOptions.Import == "" && restoreOptions.Pod != "" {
+ return errors.Errorf("--pod can only be used with --import")
+ }
if restoreOptions.Name != "" && restoreOptions.TCPEstablished {
return errors.Errorf("--tcp-established cannot be used with --name")
}