Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker commit running container

When committing a running container with docker commit, is this creating a consistent snapshot of the filesystem?

I'm considering this approach for backing up containers. You would just have to docker commit <container> <container>:<date> and push it to a local registry.

The backup would be incremental, as the commit would just create a new layer.

Also would the big amount of layers hurt io performance of the container drastically? Is there a way to remove intermediate layers at a later point in time?

Edit

By consistent I mean that every application that is designed to survive a power-loss should be able to recover from this snapshots. Basically this means that no file must change after the snapshot is started.

Meanwhile I found out that docker supports multiple storage drivers (aufs, devicemapper, btrfs) now. Unfortunately there is hardly any documentation about the differences between them and the options they support.

like image 612
Florian Gutmann Avatar asked Jun 02 '14 08:06

Florian Gutmann


1 Answers

I guess consistency is what you define it to be.

In terms of flattening and the downsides of stacking too many AUFS layers see: https://github.com/dotcloud/docker/issues/332

docker flatten is linked there.

like image 163
till Avatar answered Sep 30 '22 18:09

till