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] container [container ...]
12
13

DESCRIPTION

15       podman container restore restores a container from  a  checkpoint.  The
16       container IDs or names are used as input.
17
18

OPTIONS

20   --all, -a
21       Restore all checkpointed containers.
22       The default is false.
23       IMPORTANT:  This  OPTION  does not need a container name or ID as input
24       argument.
25
26
27   --keep, -k
28       Keep all temporary log and statistics  files  created  by  CRIU  during
29       checkpointing  as  well  as  restoring.  These files are not deleted if
30       restoring fails for further  debugging.  If  restoring  succeeds  these
31       files  are theoretically not needed, but if these files are needed Pod‐
32       man can keep the files for further analysis. This includes  the  check‐
33       point  directory  with all files created during checkpointing. The size
34       required by the checkpoint directory is roughly the same as the  amount
35       of memory required by the processes in the checkpointed container.
36       Without  the --keep, -k option the checkpoint will be consumed and can‐
37       not be used again.
38       The default is false.
39
40
41   --latest, -l
42       Instead of providing the container ID or name,  use  the  last  created
43       container.  If  other tools than Podman are used to run containers such
44       as CRI-O, the last started container could be from either tool.
45       The default is false.
46       IMPORTANT: This OPTION is not available with the remote Podman  client.
47       This OPTION does not need a container name or ID as input argument.
48
49
50   --ignore-rootfs
51       If a container is restored from a checkpoint tar.gz file it is possible
52       that it also contains all  root  file-system  changes.  With  --ignore-
53       rootfs  it  is possible to explicitly disable applying these root file-
54       system changes to the restored container.
55       The default is false.
56       *IMPORTANT: This OPTION is only available in combination with --import,
57       -i.*
58
59
60   --ignore-static-ip
61       If  the  container  was  started  with --ip the restored container also
62       tries to use that IP address and restore fails if that  IP  address  is
63       already  in  use.  This can happen, if a container is restored multiple
64       times from an exported checkpoint with --name, -n.
65
66
67       Using --ignore-static-ip tells Podman to ignore the IP  address  if  it
68       was configured with --ip during container creation.
69
70
71       The default is false.
72
73
74   --ignore-static-mac
75       If  the container was started with --mac-address the restored container
76       also tries to use that MAC address and restore fails if  that  MAC  ad‐
77       dress  is  already  in use. This can happen, if a container is restored
78       multiple times from an exported checkpoint with --name, -n.
79
80
81       Using --ignore-static-mac tells Podman to ignore the MAC address if  it
82       was configured with --mac-address during container creation.
83
84
85       The default is false.
86
87
88   --ignore-volumes
89       This  option  must be used in combination with the --import, -i option.
90       When restoring containers from a checkpoint tar.gz file with  this  op‐
91       tion, the content of associated volumes will not be restored.
92       The default is false.
93
94
95   --import, -i=file
96       Import a checkpoint tar.gz file, which was exported by Podman. This can
97       be used to import a checkpointed container from another host.
98       IMPORTANT: This OPTION does not need a container name or  ID  as  input
99       argument.
100
101
102   --import-previous=file
103       Import  a pre-checkpoint tar.gz file which was exported by Podman. This
104       option must be used with -i or --import. It only works on runc  1.0-rc3
105       or higher.
106
107
108   --name, -n=name
109       If a container is restored from a checkpoint tar.gz file it is possible
110       to rename it with --name, -n. This way it is possible to restore a con‐
111       tainer from a checkpoint multiple times with different names.
112
113
114       If the --name, -n option is used, Podman will not attempt to assign the
115       same IP address to the container it was using before  checkpointing  as
116       each  IP  address can only be used once and the restored container will
117       have another IP address. This also means that --name, -n cannot be used
118       in combination with --tcp-established.
119       *IMPORTANT: This OPTION is only available in combination with --import,
120       -i.*
121
122
123   --pod=name
124       Restore a container into the pod name. The destination pod for this re‐
125       store  has to have the same namespaces shared as the pod this container
126       was checkpointed from (see **podman pod  create  --share.   *IMPORTANT:
127       This OPTION is only available in combination with --import, -i.*
128
129
130       This option requires at least CRIU 3.16.
131
132
133   --publish, -p=port
134       Replaces  the  ports that the container publishes, as configured during
135       the initial container start, with a new set of port forwarding rules.
136
137
138       For more details please see podman run --publish.
139
140
141   --tcp-established
142       Restore a container with established TCP connections. If the checkpoint
143       image  contains  established  TCP  connections, this option is required
144       during restore.  If the checkpoint image does not  contain  established
145       TCP  connections this option is ignored. Defaults to not restoring con‐
146       tainers with established TCP connections.
147       The default is false.
148
149

EXAMPLE

151       Restores the container "mywebserver".
152
153
154              # podman container restore mywebserver
155
156
157
158       Import a checkpoint file and a pre-checkpoint file.
159
160
161              # podman container restore --import-previous pre-checkpoint.tar.gz --import checkpoint.tar.gz
162
163
164
165       Remove the container "mywebserver". Make a checkpoint of the  container
166       and  export  it.  Restore the container with other port ranges from the
167       exported file.
168
169
170              $ podman run --rm -p 2345:80 -d webserver
171              # podman container checkpoint -l --export=dump.tar
172              # podman container restore -p 5432:8080 --import=dump.tar
173
174
175

SEE ALSO

177       podman(1), podman-container-checkpoint(1),  podman-run(1),  podman-pod-
178       create(1)
179
180

HISTORY

182       September  2018,  Originally compiled by Adrian Reber areber@redhat.com
183       ⟨mailto:areber@redhat.com⟩
184
185
186
187                                                 podman-container-restore(1)()
Impressum