diff options
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index b8b60a6e2..72c4d7f37 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -825,6 +825,13 @@ type ContainerCheckpointOptions struct { // Checkpoint checkpoints a container func (c *Container) Checkpoint(ctx context.Context, options ContainerCheckpointOptions) error { logrus.Debugf("Trying to checkpoint container %s", c.ID()) + + if options.TargetFile != "" { + if err := c.prepareCheckpointExport(); err != nil { + return err + } + } + if !c.batched { c.lock.Lock() defer c.lock.Unlock() |