|
| 1 | +# Checkpoint and Restore # |
| 2 | + |
| 3 | +For a basic description about checkpointing and restoring containers with |
| 4 | +`runc` please see [runc-checkpoint(8)](../man/runc-checkpoint.8.md) and |
| 5 | +[runc-restore(8)](../man/runc-restore.8.md). |
| 6 | + |
| 7 | +## Checkpoint/Restore Annotations ## |
| 8 | + |
| 9 | +In addition to specifying options on the command-line like it is described |
| 10 | +in the man-pages (see above), it is also possible to influence CRIU's |
| 11 | +behaviour using CRIU configuration files. For details about CRIU's |
| 12 | +configuration file support please see [CRIU's wiki](https://criu.org/Configuration_files). |
| 13 | + |
| 14 | +In addition to CRIU's default configuration files `runc` tells CRIU to |
| 15 | +also evaluate the file `/etc/criu/runc.conf`. Using the annotation |
| 16 | +`org.criu.config` it is, however, possible to change this additional |
| 17 | +CRIU configuration file. |
| 18 | + |
| 19 | +If the annotation `org.criu.config` is set to an empty string `runc` |
| 20 | +will not pass any additional configuration file to CRIU. With an empty |
| 21 | +string it is therefore possible to disable the additional CRIU configuration |
| 22 | +file. This can be used to make sure that no additional configuration file |
| 23 | +changes CRIU's behaviour accidentally. |
| 24 | + |
| 25 | +If the annotation `org.criu.config` is set to a non-empty string `runc` will |
| 26 | +pass that string to CRIU to be evaluated as an additional configuration file. |
| 27 | +If CRIU cannot open this additional configuration file, it will ignore this |
| 28 | +file and continue. |
| 29 | + |
| 30 | +### Annotation Example to disable additional CRIU configuration file ### |
| 31 | + |
| 32 | +``` |
| 33 | +{ |
| 34 | + "ociVersion": "1.0.0", |
| 35 | + "annotations": { |
| 36 | + "org.criu.config": "" |
| 37 | + }, |
| 38 | + "process": { |
| 39 | +``` |
| 40 | + |
| 41 | +### Annotation Example to set a specific CRIU configuration file ### |
| 42 | + |
| 43 | +``` |
| 44 | +{ |
| 45 | + "ociVersion": "1.0.0", |
| 46 | + "annotations": { |
| 47 | + "org.criu.config": "/etc/special-runc-criu-options" |
| 48 | + }, |
| 49 | + "process": { |
| 50 | +``` |
0 commit comments