Skip to content
Backup docker container filesystem, metadata and volume data
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Backup docker container filesystem R/W layer, metadata and volume data.

Docker containers are composed of several data lying around an image :

  • R/W layer, holding anything created or modified on the container filesystem that doen't fall into a volume
  • Metadata, where docker stores container configuration and logs
  • Optionally, some volumes (either managed volumes or bind mounts)

Docker does not provide any tool to backup that data, you can only dump the whole container filesystem using docker export.

docker-backup offers a simple way to list paths containing that data (on the docker host filesystem), hence allowing to archive it.

You can either use the output of docker-backup ls with your favorite archiving tool (tar, zip, rar, 7z...) or use the embeded docker-backup dump command (see example below).

Currently, only aufs and overlay2 storage drivers are supported.


curl -Lo /usr/local/bin/docker-backup && chmod +x /usr/local/bin/docker-backup

OR :

wget -O /usr/local/bin/docker-backup && chmod +x /usr/local/bin/docker-backup


Usage: docker-backup [command] <command arguments>

Commands :
  ls    List container data paths
    docker-backup ls [options] <container id or name>
    -c  Container metadata
    -w  Container rw layer
    -v  Container managed volumes
  dump  Backup container data to an archive
    docker-backup dump [docker-backup ls options] <container id or name> <archive path> [tar options]


# docker-backup ls -cwv portainer
# docker-backup dump -cwv portainer /tmp/portainer.tar.gz --totals
tar: Removing leading `/' from member names
Total bytes written: 81920 (80KiB, 79MiB/s)
You can’t perform that action at this time.