Description #

The docker copy source uses the docker cp command to source files that are inside a running or stopped container.

Configuration #

{
  "sources": {
    "name": "my-docker-cp-source",
    "type": "DOCKER_CP",
    "disabled": false,
    "container": "compassionate_darwin",
    "paths": [
      "var/config/",
      "var/data/database.db"
    ],
    "remotes": [
      "my-remote",
      {
        // ...
      }
    ],
    "transformers": [
      // ...
    ]
  }
}

Available configuration options #

name #

  • required

The name of the source. This has to be a valid identifier.

type #

  • required
  • constant

A constant that tells the engine what kind of source this object is. This must be set to "DOCKER_CP".

container #

  • required
  • template enabled

A string that can identify a container (name or partial container ID). Sourcing will stop if a container cannot be found.

paths #

  • required (min 1 item)
  • template enabled

An array of paths, relative to the root directory of the container, that should be used to match any files to be backed up.

allowNotFoundPaths #

  • default value

Skip paths that do not exist in the container. Sourcing will stop if set to false and path does not exist. Defaults to false.

disabled #

  • default value

Whether to ignore this source during the backup process. Defaults to false.

remotes #

  • default value

An array of remote identifiers, or inline configurations. If using an identifier, a remote with the respective name must exist in the root configuration. Defaults to no remotes.

See remotes for a list of available remotes.

transformers #

  • default value

An array of transformer types, or inline configurations. Transformers will be executed in the order they are defined in the array. Defaults to no transformers.

See transformers for a list of available transformers.