File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -618,13 +618,19 @@ var checkpointContainerCommand = &cli.Command{
618
618
& cli.StringFlag {
619
619
Name : "export" ,
620
620
Aliases : []string {"e" },
621
- Usage : "Specify the name of the archive used to export the checkpoint image." ,
621
+ Usage : "Specify the name of the tar archive (/path/to/checkpoint.tar) used to export the checkpoint image." ,
622
622
},
623
623
},
624
624
Action : func (c * cli.Context ) error {
625
625
if c .NArg () == 0 {
626
626
return fmt .Errorf ("ID cannot be empty" )
627
627
}
628
+ if c .String ("export" ) == "" {
629
+ return fmt .Errorf (
630
+ "Cannot checkpoint a container without specifying the checkpoint destination. " +
631
+ "Use --export=/path/to/checkpoint.tar" ,
632
+ )
633
+ }
628
634
runtimeClient , err := getRuntimeService (c , 0 )
629
635
if err != nil {
630
636
return err
Original file line number Diff line number Diff line change @@ -369,6 +369,15 @@ CONTAINER IMAGE CREATED STATE
369
369
b25b4f26e3429 busybox:latest 14 seconds ago Running busybox 0 158d7a6665ff3
370
370
```
371
371
372
+ ### Checkpoint a running container
373
+
374
+ ``` sh
375
+ $ crictl checkpoint --export=/path/to/checkpoint.tar 39fcdd7a4f1d4
376
+ 39fcdd7a4f1d4
377
+ $ ls /path/to/checkpoint.tar
378
+ /path/to/checkpoint.tar
379
+ ```
380
+
372
381
## More information
373
382
374
383
* See the [ Kubernetes.io Debugging Kubernetes nodes with crictl doc] ( https://kubernetes.io/docs/tasks/debug-application-cluster/crictl/ )
You can’t perform that action at this time.
0 commit comments