aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/restore.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/restore.go')
-rw-r--r--cmd/podman/restore.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/restore.go b/cmd/podman/restore.go
index 7ecec24ee..3ae141d41 100644
--- a/cmd/podman/restore.go
+++ b/cmd/podman/restore.go
@@ -45,6 +45,7 @@ func init() {
flags.BoolVar(&restoreCommand.TcpEstablished, "tcp-established", false, "Restore a container with established TCP connections")
flags.StringVarP(&restoreCommand.Import, "import", "i", "", "Restore from exported checkpoint archive (tar.gz)")
flags.StringVarP(&restoreCommand.Name, "name", "n", "", "Specify new name for container restored from exported checkpoint (only works with --import)")
+ flags.BoolVar(&restoreCommand.IgnoreRootfs, "ignore-rootfs", false, "Do not apply root file-system changes when importing from exported checkpoint")
markFlagHiddenForRemoteClient("latest", flags)
}
@@ -60,6 +61,10 @@ func restoreCmd(c *cliconfig.RestoreValues, cmd *cobra.Command) error {
}
defer runtime.DeferredShutdown(false)
+ if c.Import == "" && c.IgnoreRootfs {
+ return errors.Errorf("--ignore-rootfs can only be used with --import")
+ }
+
if c.Import == "" && c.Name != "" {
return errors.Errorf("--name can only be used with --import")
}