1podman-container-restore(1)()                    podman-container-restore(1)()
2
3
4

NAME

6       podman-container-restore  -  Restores  one  or  more  containers from a
7       checkpoint
8
9

SYNOPSIS

11       podman container restore [options] name [...]
12
13

DESCRIPTION

15       podman container restore restores a container from a  container  check‐
16       point  or  checkpoint  image. The container IDs, image IDs or names are
17       used as input.
18
19

OPTIONS

21   --all, -a
22       Restore all checkpointed containers.
23       The default is false.
24       IMPORTANT: This OPTION does not need a container name or  ID  as  input
25       argument.
26
27
28   --file-locks
29       Restore a container with file locks. This option is required to restore
30       file locks from a checkpoint image. If the checkpoint  image  does  not
31       contain  file  locks, this option is ignored. Defaults to not restoring
32       file locks.
33       The default is false.
34
35
36   --ignore-rootfs
37       If a container is restored from a checkpoint tar.gz file it is possible
38       that  it  also  contains  all  root file-system changes. With --ignore-
39       rootfs it is possible to explicitly disable applying these  root  file-
40       system changes to the restored container.
41       The default is false.
42       IMPORTANT:  This OPTION is only available in combination with --import,
43       -i.
44
45
46   --ignore-static-ip
47       If the container was started with  --ip  the  restored  container  also
48       tries  to  use  that IP address and restore fails if that IP address is
49       already in use. This can happen, if a container  is  restored  multiple
50       times from an exported checkpoint with --name, -n.
51
52
53       Using  --ignore-static-ip  tells  Podman to ignore the IP address if it
54       was configured with --ip during container creation.
55
56
57       The default is false.
58
59
60   --ignore-static-mac
61       If the container was started with --mac-address the restored  container
62       also  tries  to  use that MAC address and restore fails if that MAC ad‐
63       dress is already in use. This can happen, if a  container  is  restored
64       multiple times from an exported checkpoint with --name, -n.
65
66
67       Using  --ignore-static-mac tells Podman to ignore the MAC address if it
68       was configured with --mac-address during container creation.
69
70
71       The default is false.
72
73
74   --ignore-volumes
75       This option must be used in combination with the --import,  -i  option.
76       When  restoring  containers from a checkpoint tar.gz file with this op‐
77       tion, the content of associated volumes will not be restored.
78       The default is false.
79
80
81   --import, -i=file
82       Import a checkpoint tar.gz file, which was exported by Podman. This can
83       be used to import a checkpointed container from another host.
84       IMPORTANT:  This  OPTION  does not need a container name or ID as input
85       argument.
86
87
88       During the import of a checkpoint file Podman will select the same con‐
89       tainer  runtime which was used during checkpointing. This is especially
90       important if a specific (non-default) container runtime  was  specified
91       during  container  creation.  Podman will also abort the restore if the
92       container runtime specified during restore does not much the  container
93       runtime used for container creation.
94
95
96   --import-previous=file
97       Import  a pre-checkpoint tar.gz file which was exported by Podman. This
98       option must be used with -i or --import. It only works on runc  1.0-rc3
99       or  higher.   IMPORTANT:  This  OPTION  is  not supported on the remote
100       client, including Mac and Windows (excluding WSL2) machines.
101
102
103   --keep, -k
104       Keep all temporary log and statistics  files  created  by  CRIU  during
105       checkpointing  as  well  as  restoring.  These files are not deleted if
106       restoring fails for further  debugging.  If  restoring  succeeds  these
107       files  are theoretically not needed, but if these files are needed Pod‐
108       man can keep the files for further analysis. This includes  the  check‐
109       point  directory  with all files created during checkpointing. The size
110       required by the checkpoint directory is roughly the same as the  amount
111       of memory required by the processes in the checkpointed container.
112       Without  the --keep, -k option the checkpoint will be consumed and can‐
113       not be used again.
114       The default is false.
115
116
117   --latest, -l
118       Instead of providing the container ID or name,  use  the  last  created
119       container.  If  other tools than Podman are used to run containers such
120       as CRI-O, the last started container could be from either tool.
121       The default is false.
122       IMPORTANT: This OPTION is not available with the remote Podman  client,
123       including  Mac  and Windows (excluding WSL2) machines. This OPTION does
124       not need a container name or ID as input argument.
125
126
127   --name, -n=name
128       If a container is restored from a checkpoint tar.gz file it is possible
129       to rename it with --name, -n. This way it is possible to restore a con‐
130       tainer from a checkpoint multiple times with different names.
131
132
133       If the --name, -n option is used, Podman will not attempt to assign the
134       same  IP  address to the container it was using before checkpointing as
135       each IP address can only be used once and the restored  container  will
136       have another IP address. This also means that --name, -n cannot be used
137       in combination with --tcp-established.
138       IMPORTANT: This OPTION is only available for a checkpoint image  or  in
139       combination with --import, -i.
140
141
142   --pod=name
143       Restore a container into the pod name. The destination pod for this re‐
144       store has to have the same namespaces shared as the pod this  container
145       was checkpointed from (see **podman pod create --share.
146       IMPORTANT:  This  OPTION is only available for a checkpoint image or in
147       combination with --import, -i.
148
149
150       This option requires at least CRIU 3.16.
151
152
153   --print-stats
154       Print out statistics about restoring the container(s).  The  output  is
155       rendered  in  a JSON array and contains information about how much time
156       different restore operations required. Many of the  restore  statistics
157       are  created  by  CRIU and just passed through to Podman. The following
158       information is provided in the JSON array:
159
160
161podman_restore_duration: Overall time (in microseconds) needed
162                to restore all checkpoints.
163
164runtime_restore_duration: Time (in microseconds) the container
165                runtime needed to restore the checkpoint.
166
167forking_time: Time (in microseconds)  CRIU  needed  to  create
168                (fork)  all  processes  in the restored container (measured by
169                CRIU).
170
171restore_time: Time (in microseconds) CRIU  needed  to  restore
172                all processes in the container (measured by CRIU).
173
174pages_restored:  Number  of memory pages restored (measured by
175                CRIU).
176
177
178
179       The default is false.
180
181
182   --publish, -p=port
183       Replaces the ports that the container publishes, as  configured  during
184       the initial container start, with a new set of port forwarding rules.
185
186
187       For more details please see podman run --publish.
188
189
190   --tcp-established
191       Restore a container with established TCP connections. If the checkpoint
192       image contains established TCP connections,  this  option  is  required
193       during  restore.   If the checkpoint image does not contain established
194       TCP connections this option is ignored. Defaults to not restoring  con‐
195       tainers with established TCP connections.
196       The default is false.
197
198

EXAMPLE

200       Restores the container "mywebserver".
201
202
203              # podman container restore mywebserver
204
205
206
207       Import a checkpoint file and a pre-checkpoint file.
208
209
210              # podman container restore --import-previous pre-checkpoint.tar.gz --import checkpoint.tar.gz
211
212
213
214       Start  the  container "mywebserver". Make a checkpoint of the container
215       and export it. Restore the container with other port  ranges  from  the
216       exported file.
217
218
219              $ podman run --rm -p 2345:80 -d webserver
220              # podman container checkpoint -l --export=dump.tar
221              # podman container restore -p 5432:8080 --import=dump.tar
222
223
224
225       Start  a  container with the name "foobar-1". Create a checkpoint image
226       "foobar-checkpoint". Restore the container from  the  checkpoint  image
227       with a different name.
228
229
230              # podman run --name foobar-1 -d webserver
231              # podman container checkpoint --create-image foobar-checkpoint foobar-1
232              # podman inspect foobar-checkpoint
233              # podman container restore --name foobar-2 foobar-checkpoint
234              # podman container restore --name foobar-3 foobar-checkpoint
235
236
237

SEE ALSO

239       podman(1),  podman-container-checkpoint(1),  podman-run(1), podman-pod-
240       create(1), criu(8)
241
242

HISTORY

244       September 2018, Originally compiled by Adrian  Reber  areber@redhat.com
245       ⟨mailto:areber@redhat.com⟩
246
247
248
249                                                 podman-container-restore(1)()
Impressum