summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/restore.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/cmd/restore.go')
-rw-r--r--runsc/cmd/restore.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/runsc/cmd/restore.go b/runsc/cmd/restore.go
index 69cdb35c1..6dc044672 100644
--- a/runsc/cmd/restore.go
+++ b/runsc/cmd/restore.go
@@ -94,16 +94,15 @@ func (r *Restore) Execute(_ context.Context, f *flag.FlagSet, args ...interface{
restoreFile := filepath.Join(r.imagePath, checkpointFileName)
- cont, err := container.Create(id, spec, conf, bundleDir, r.consoleSocket, r.pidFile, restoreFile)
+ c, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error restoring container: %v", err)
+ Fatalf("error loading container: %v", err)
}
-
- if err := cont.Start(conf); err != nil {
- Fatalf("error starting container: %v", err)
+ if err := c.Restore(spec, conf, restoreFile); err != nil {
+ Fatalf("error restoring container: %v", err)
}
- ws, err := cont.Wait()
+ ws, err := c.Wait()
if err != nil {
Fatalf("error running container: %v", err)
}