Description #

The local source is a source type that uses the current machine's file system to look up files for backing up.

Configuration #

{
  "sources": {
    "name": "my-local-source",
    "type": "LOCAL",
    "disabled": false,
    "directory": "/var/foo",
    "files": [
      "**/*.json",
      "bar/*.txt"
    ],
    "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 "LOCAL".

directory #

  • required
  • template enabled

The base directory for the engine to start looking for files to back up. This must be an absolute path.

files #

  • required
  • template enabled

An array of file patterns, relative to directory, that should be used to match any files to be backed up.

Available matchers, given the following file structure:

[directory, specified above]/
├─ dir-a/
│  ├─ a-file-1.txt
├─ dir-b/
├─ dir-c/
│  ├─ c-dir1/
│  │  ├─ c1-dir-1/
│  │  │  ├─ c11-file-1.txt
│  ├─ c-dir2/
│  ├─ c-dir3/
│  ├─ c-file-1.txt
│  ├─ c-file-2.json
│  ├─ c-file-3.sh
├─ root-file-a.txt
├─ root-file-b.json
├─ root-file-c.sh
Matcher Files matched
** all files
**/*.txt a-file-1.txt c11-file-1.txt c-file-1.txt root-file-a.txt
dir-a/** a-file-1.txt
dir-c/** c11-file-1.txt c-file-1.txt c-file-2.json c-file-3.sh
dir-c/c-file-3.sh c-file-3.sh
dir-b/** nothing
not-a-file.any nothing

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.