mirror of
https://github.com/containers/podman.git
synced 2025-06-25 12:20:42 +08:00
Fix podman container restore -a
podman container restore -a was using the wrong filter to restore checkpointed containers. This switches from 'running' containers to 'exited' containers. Restoring with -a only works if all exited containers have been checkpointed. Maybe it would make sense to track which containers have been really checkpointed. This is just to fix '-a' to work at least if all exited containers have been checkpointed. Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:

committed by
Adrian Reber

parent
4ed10c5c7a
commit
fbe8e23ce6
@ -66,7 +66,7 @@ func restoreCmd(c *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
containers, lastError := getAllOrLatestContainers(c, runtime, libpod.ContainerStateRunning, "checkpointed")
|
||||
containers, lastError := getAllOrLatestContainers(c, runtime, libpod.ContainerStateExited, "checkpointed")
|
||||
|
||||
for _, ctr := range containers {
|
||||
if err = ctr.Restore(context.TODO(), options); err != nil {
|
||||
|
Reference in New Issue
Block a user