CLI reference
All commands take the global flags below. dapple help COMMAND shows the same information in the terminal.
Global flags
| Flag | Description |
|---|---|
--config FILE | Configuration file. Default: /etc/dapple/dapple.yaml. |
--log-level LEVEL | debug, info, warn or error. |
-h, --help | Show help for a command. |
-v, --version | Print the version and exit. |
dapple init
Create a new repository. The repository is created at the location given by --repo or the repository option. You are asked for a password unless password_file is set.
dapple init [flags]
| Flag | Default | Description |
|---|---|---|
--repo URL | – | Where to create the repository. |
--compression MODE | auto | Default compression for new data: off, auto or max. |
dapple backup
Make a snapshot of the given paths. Only data that is not in the repository yet is read from disk and uploaded. Files whose size and modification time did not change since the last snapshot are not read at all.
dapple backup [flags] PATH...
| Flag | Default | Description |
|---|---|---|
--exclude PATTERN | – | Leave out paths matching the pattern. May be given more than once. |
--exclude-file FILE | – | Read exclude patterns from a file, one per line. |
--tag TAG | – | Add a tag to the snapshot. |
--one-file-system | false | Do not cross into other mounted filesystems. |
--dry-run | false | Show what would be backed up without writing anything. |
dapple snapshots
List the snapshots in the repository.
dapple snapshots [flags]
| Flag | Default | Description |
|---|---|---|
--tag TAG | – | Only list snapshots with this tag. |
--host HOST | – | Only list snapshots made on this host. |
--json | false | Print the list as JSON. |
dapple restore
Restore files from a snapshot. SNAPSHOT is a snapshot ID, a unique prefix of one, or latest.
dapple restore [flags] SNAPSHOT
| Flag | Default | Description |
|---|---|---|
--target DIR | – | Folder to restore into. Required. |
--include PATTERN | – | Only restore paths matching the pattern. |
--verify | false | Read the restored files back and compare them with the snapshot. |
dapple prune
Remove snapshots the retention policy no longer keeps. Data that is no longer used by any snapshot is deleted from the repository afterwards.
dapple prune [flags]
| Flag | Default | Description |
|---|---|---|
--keep-daily N | 7 | Keep the last snapshot of each of the last N days. |
--keep-weekly N | 4 | Keep the last snapshot of each of the last N weeks. |
--keep-monthly N | 12 | Keep the last snapshot of each of the last N months. |
--dry-run | false | Show what would be removed. |
dapple check
Verify the structure and data of the repository. Without flags only the index and the snapshot trees are checked, which is quick. --read-data downloads and decrypts every chunk.
dapple check [flags]
| Flag | Default | Description |
|---|---|---|
--read-data | false | Read and verify all data. |
--read-data-subset N% | – | Read and verify a random part of the data. |
dapple mount
Mount a snapshot as a read-only folder. Available on Linux and macOS. The folder stays mounted until you press Ctrl+C or unmount it.
dapple mount [flags] SNAPSHOT DIR
| Flag | Default | Description |
|---|---|---|
--allow-other | false | Let other users read the mounted folder. |
dapple completion
Print a shell completion script. SHELL is bash, zsh or fish.
dapple completion SHELL