aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/restore.go11
-rw-r--r--docs/podman-container-restore.1.md4
2 files changed, 10 insertions, 5 deletions
diff --git a/cmd/podman/restore.go b/cmd/podman/restore.go
index 4d715ad4f..6e445e5df 100644
--- a/cmd/podman/restore.go
+++ b/cmd/podman/restore.go
@@ -76,11 +76,16 @@ func restoreCmd(c *cliconfig.RestoreValues, cmd *cobra.Command) error {
return errors.Errorf("--tcp-established cannot be used with --name")
}
- if (c.Import != "") && (c.All || c.Latest) {
- return errors.Errorf("Cannot use --import and --all or --latest at the same time")
+ argLen := len(c.InputArgs)
+ if c.Import != "" {
+ if c.All || c.Latest {
+ return errors.Errorf("Cannot use --import with --all or --latest")
+ }
+ if argLen > 0 {
+ return errors.Errorf("Cannot use --import with positional arguments")
+ }
}
- argLen := len(c.InputArgs)
if (c.All || c.Latest) && argLen > 0 {
return errors.Errorf("no arguments are needed with --all or --latest")
}
diff --git a/docs/podman-container-restore.1.md b/docs/podman-container-restore.1.md
index 5b94cd2fa..c96a37f80 100644
--- a/docs/podman-container-restore.1.md
+++ b/docs/podman-container-restore.1.md
@@ -45,8 +45,8 @@ connections.
**--import, -i**
Import a checkpoint tar.gz file, which was exported by Podman. This can be used
-to import a checkpointed container from another host. It is not necessary to specify
-a container when restoring from an exported checkpoint.
+to import a checkpointed container from another host. Do not specify a *container*
+argument when using this option.
**--name, -n**