summaryrefslogtreecommitdiff
path: root/cmd/podman/restore.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/restore.go')
-rw-r--r--cmd/podman/restore.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/restore.go b/cmd/podman/restore.go
index 2911bbdd6..5f6e7b892 100644
--- a/cmd/podman/restore.go
+++ b/cmd/podman/restore.go
@@ -29,6 +29,9 @@ var (
restoreCommand.GlobalFlags = MainGlobalOpts
return restoreCmd(&restoreCommand)
},
+ Args: func(cmd *cobra.Command, args []string) error {
+ return checkAllAndLatest(cmd, args, false)
+ },
Example: `podman container restore ctrID
podman container restore --latest
podman container restore --all`,
@@ -45,6 +48,7 @@ func init() {
// TODO: add ContainerStateCheckpointed
flags.BoolVar(&restoreCommand.TcpEstablished, "tcp-established", false, "Checkpoint a container with established TCP connections")
+ markFlagHiddenForRemoteClient("latest", flags)
}
func restoreCmd(c *cliconfig.RestoreValues) error {
@@ -63,10 +67,6 @@ func restoreCmd(c *cliconfig.RestoreValues) error {
TCPEstablished: c.TcpEstablished,
}
- if err := checkAllAndLatest(&c.PodmanCommand); err != nil {
- return err
- }
-
containers, lastError := getAllOrLatestContainers(&c.PodmanCommand, runtime, libpod.ContainerStateExited, "checkpointed")
for _, ctr := range containers {