which will mean, that the mountpoint /bar has inaccessible root.
which will mean, that the mountpoint /bar has inaccessible root.
+
+
To dump and restore them there's the <code>--ext-mount-map KEY:VAL</code> option that sets up external mounts root mapping.
+
+
On dump, KEY is a mountpoint inside container and correspoding VAL is a string that will be written into the image as mountpoint's root value.
+
+
On restore KEY is the value from the image (VAL from dump) and the VAL is the path on host that will be bind-mounted into container (to the mountpoint path from image).
+
+
For example, if we want to dump the task above we should call
+
+
criu dump ... --ext-mount-map /bar:barmount
+
+
The word <code>barmount</code> is an arbitrary identifier, that will be put in the image file instead of the original root path
+
+
criu show -f mountpoints.img -F mnt_id,root,mountpoint
+
mnt_id: 0x22 root: barmount mountpoint: /bar
+
+
On restore we should tell CRIU where to bind mount the <code>barmount</code> from like this
+
+
criu restore ... --ext-mount-map barmount:/foo
+
+
With this CRIU will bind mount the /foo into proper mountpoint.