-
How-to guides
- π₯ Set up backups
- π Make per-application backups
- π Provide your passwords
- βοΈ Make backups redundant
- π Deal with very large backups
- π Inspect your backups
- π¨ Monitor your backups
- π€ Extract a backup
- ποΈ Backup your databases
- πΈ Snapshot your filesystems
- π§Ή Add preparation and cleanup steps
- πΎ Backup to a removable drive/server
- π§ Run arbitrary Borg commands
- π₯ Customize warnings/errors
- π¦ Upgrade borgmatic/Borg
- ποΈ Develop on borgmatic
- Reference guides
borgmatic options
Here are all of the available borgmatic command-line flags for the most recent version of borgmatic, including the separate flags for each action (sub-command). Most of the flags listed here do not have equivalents in borgmatic's configuration file.
If you're using an older version of borgmatic, some of these flags may not be
present in that version and you should instead use borgmatic --help
or
borgmatic [action name] --help
(where [action name]
is the name of an
action like list
, create
, etc.).
usage: borgmatic [-h] [-c CONFIG_PATHS] [-n]
[--override OPTION.SUBOPTION=VALUE]
[--no-environment-interpolation] [--bash-completion]
[--fish-completion] [--version] [--after-actions[0]
AFTER_ACTIONS[0]] [--after-actions AFTER_ACTIONS]
[--after-backup[0] AFTER_BACKUP[0]]
[--after-backup AFTER_BACKUP] [--after-check[0]
AFTER_CHECK[0]] [--after-check AFTER_CHECK]
[--after-compact[0] AFTER_COMPACT[0]]
[--after-compact AFTER_COMPACT] [--after-everything[0]
AFTER_EVERYTHING[0]] [--after-everything AFTER_EVERYTHING]
[--after-extract[0] AFTER_EXTRACT[0]]
[--after-extract AFTER_EXTRACT] [--after-prune[0]
AFTER_PRUNE[0]] [--after-prune AFTER_PRUNE]
[--apprise.fail.body BODY] [--apprise.fail.title TITLE]
[--apprise.finish.body BODY] [--apprise.finish.title TITLE]
[--apprise.log.body BODY] [--apprise.log.title TITLE]
[--apprise.logs-size-limit LOGS_SIZE_LIMIT]
[--apprise.send-logs] [--apprise.no-send-logs]
[--apprise.services[0].label LABEL]
[--apprise.services[0].url URL] [--apprise.services SERVICES]
[--apprise.start.body BODY] [--apprise.start.title TITLE]
[--apprise.states[0] STATES[0]] [--apprise.states STATES]
[--archive-name-format ARCHIVE_NAME_FORMAT] [--atime]
[--no-atime] [--before-actions[0] BEFORE_ACTIONS[0]]
[--before-actions BEFORE_ACTIONS] [--before-backup[0]
BEFORE_BACKUP[0]] [--before-backup BEFORE_BACKUP]
[--before-check[0] BEFORE_CHECK[0]]
[--before-check BEFORE_CHECK] [--before-compact[0]
BEFORE_COMPACT[0]] [--before-compact BEFORE_COMPACT]
[--before-everything[0] BEFORE_EVERYTHING[0]]
[--before-everything BEFORE_EVERYTHING] [--before-extract[0]
BEFORE_EXTRACT[0]] [--before-extract BEFORE_EXTRACT]
[--before-prune[0] BEFORE_PRUNE[0]]
[--before-prune BEFORE_PRUNE] [--birthtime] [--no-birthtime]
[--bootstrap.store-config-files]
[--bootstrap.no-store-config-files]
[--borg-base-directory BORG_BASE_DIRECTORY]
[--borg-cache-directory BORG_CACHE_DIRECTORY]
[--borg-config-directory BORG_CONFIG_DIRECTORY]
[--borg-exit-codes[0].code CODE]
[--borg-exit-codes[0].treat-as TREAT_AS]
[--borg-exit-codes BORG_EXIT_CODES]
[--borg-files-cache-ttl BORG_FILES_CACHE_TTL]
[--borg-keys-directory BORG_KEYS_DIRECTORY]
[--borg-security-directory BORG_SECURITY_DIRECTORY]
[--borgmatic-source-directory BORGMATIC_SOURCE_DIRECTORY]
[--btrfs.btrfs-command BTRFS_COMMAND]
[--btrfs.findmnt-command FINDMNT_COMMAND]
[--check-i-know-what-i-am-doing]
[--no-check-i-know-what-i-am-doing] [--check-last CHECK_LAST]
[--check-repositories[0] CHECK_REPOSITORIES[0]]
[--check-repositories CHECK_REPOSITORIES]
[--checkpoint-interval CHECKPOINT_INTERVAL]
[--checkpoint-volume CHECKPOINT_VOLUME]
[--checks[0].frequency FREQUENCY]
[--checks[0].count-tolerance-percentage COUNT_TOLERANCE_PERCENTAGE]
[--checks[0].name NAME]
[--checks[0].max-duration MAX_DURATION]
[--checks[0].data-sample-percentage DATA_SAMPLE_PERCENTAGE]
[--checks[0].only-run-on[0] ONLY_RUN_ON[0]]
[--checks[0].only-run-on ONLY_RUN_ON]
[--checks[0].data-tolerance-percentage DATA_TOLERANCE_PERCENTAGE]
[--checks[0].xxh64sum-command XXH64SUM_COMMAND]
[--checks CHECKS] [--chunker-params CHUNKER_PARAMS] [--color]
[--no-color] [--commands[0].before BEFORE]
[--commands[0].after AFTER] [--commands[0].run[0] RUN[0]]
[--commands[0].run RUN] [--commands[0].when[0] WHEN[0]]
[--commands[0].when WHEN] [--commands[0].states[0] STATES[0]]
[--commands[0].states STATES] [--commands COMMANDS]
[--compact-threshold COMPACT_THRESHOLD]
[--compression COMPRESSION] [--constants CONSTANTS]
[--container.secrets-directory SECRETS_DIRECTORY]
[--cronhub.ping-url PING_URL] [--cronitor.ping-url PING_URL]
[--ctime] [--no-ctime] [--debug-passphrase]
[--no-debug-passphrase] [--default-actions]
[--no-default-actions] [--display-passphrase]
[--no-display-passphrase]
[--encryption-passcommand ENCRYPTION_PASSCOMMAND]
[--encryption-passphrase ENCRYPTION_PASSPHRASE]
[--exclude-caches] [--no-exclude-caches] [--exclude-from[0]
EXCLUDE_FROM[0]] [--exclude-from EXCLUDE_FROM]
[--exclude-if-present[0] EXCLUDE_IF_PRESENT[0]]
[--exclude-if-present EXCLUDE_IF_PRESENT] [--exclude-nodump]
[--no-exclude-nodump] [--exclude-patterns[0]
EXCLUDE_PATTERNS[0]] [--exclude-patterns EXCLUDE_PATTERNS]
[--extra-borg-options.check CHECK]
[--extra-borg-options.compact COMPACT]
[--extra-borg-options.create CREATE]
[--extra-borg-options.init INIT]
[--extra-borg-options.prune PRUNE]
[--files-cache FILES_CACHE] [--flags] [--no-flags]
[--healthchecks.create-slug] [--healthchecks.no-create-slug]
[--healthchecks.ping-body-limit PING_BODY_LIMIT]
[--healthchecks.ping-url PING_URL] [--healthchecks.send-logs]
[--healthchecks.no-send-logs] [--healthchecks.states[0]
STATES[0]] [--healthchecks.states STATES]
[--healthchecks.verify-tls] [--healthchecks.no-verify-tls]
[--keep-13weekly KEEP_13WEEKLY]
[--keep-3monthly KEEP_3MONTHLY] [--keep-daily KEEP_DAILY]
[--keep-exclude-tags] [--no-keep-exclude-tags]
[--keep-hourly KEEP_HOURLY] [--keep-minutely KEEP_MINUTELY]
[--keep-monthly KEEP_MONTHLY] [--keep-secondly KEEP_SECONDLY]
[--keep-weekly KEEP_WEEKLY] [--keep-within KEEP_WITHIN]
[--keep-yearly KEEP_YEARLY]
[--keepassxc.keepassxc-cli-command KEEPASSXC_CLI_COMMAND]
[--keepassxc.key-file KEY_FILE] [--keepassxc.yubikey YUBIKEY]
[--local-path LOCAL_PATH] [--lock-wait LOCK_WAIT]
[--log-file LOG_FILE] [--log-file-format LOG_FILE_FORMAT]
[--log-file-verbosity LOG_FILE_VERBOSITY] [--log-json]
[--no-log-json] [--loki.labels LABELS] [--loki.url URL]
[--lvm.lsblk-command LSBLK_COMMAND]
[--lvm.lvcreate-command LVCREATE_COMMAND]
[--lvm.lvremove-command LVREMOVE_COMMAND]
[--lvm.lvs-command LVS_COMMAND]
[--lvm.mount-command MOUNT_COMMAND]
[--lvm.snapshot-size SNAPSHOT_SIZE]
[--lvm.umount-command UMOUNT_COMMAND]
[--mariadb-databases[0].add-drop-database]
[--mariadb-databases[0].no-add-drop-database]
[--mariadb-databases[0].format FORMAT]
[--mariadb-databases[0].hostname HOSTNAME]
[--mariadb-databases[0].list-options LIST_OPTIONS]
[--mariadb-databases[0].mariadb-command MARIADB_COMMAND]
[--mariadb-databases[0].mariadb-dump-command MARIADB_DUMP_COMMAND]
[--mariadb-databases[0].name NAME]
[--mariadb-databases[0].options OPTIONS]
[--mariadb-databases[0].password PASSWORD]
[--mariadb-databases[0].password-transport PASSWORD_TRANSPORT]
[--mariadb-databases[0].port PORT]
[--mariadb-databases[0].restore-hostname RESTORE_HOSTNAME]
[--mariadb-databases[0].restore-options RESTORE_OPTIONS]
[--mariadb-databases[0].restore-password RESTORE_PASSWORD]
[--mariadb-databases[0].restore-port RESTORE_PORT]
[--mariadb-databases[0].restore-tls]
[--mariadb-databases[0].no-restore-tls]
[--mariadb-databases[0].restore-username RESTORE_USERNAME]
[--mariadb-databases[0].tls] [--mariadb-databases[0].no-tls]
[--mariadb-databases[0].username USERNAME]
[--mariadb-databases MARIADB_DATABASES]
[--mongodb-databases[0].authentication-database AUTHENTICATION_DATABASE]
[--mongodb-databases[0].format FORMAT]
[--mongodb-databases[0].hostname HOSTNAME]
[--mongodb-databases[0].mongodump-command MONGODUMP_COMMAND]
[--mongodb-databases[0].mongorestore-command MONGORESTORE_COMMAND]
[--mongodb-databases[0].name NAME]
[--mongodb-databases[0].options OPTIONS]
[--mongodb-databases[0].password PASSWORD]
[--mongodb-databases[0].port PORT]
[--mongodb-databases[0].restore-hostname RESTORE_HOSTNAME]
[--mongodb-databases[0].restore-options RESTORE_OPTIONS]
[--mongodb-databases[0].restore-password RESTORE_PASSWORD]
[--mongodb-databases[0].restore-port RESTORE_PORT]
[--mongodb-databases[0].restore-username RESTORE_USERNAME]
[--mongodb-databases[0].username USERNAME]
[--mongodb-databases MONGODB_DATABASES]
[--monitoring-verbosity MONITORING_VERBOSITY]
[--mysql-databases[0].add-drop-database]
[--mysql-databases[0].no-add-drop-database]
[--mysql-databases[0].format FORMAT]
[--mysql-databases[0].hostname HOSTNAME]
[--mysql-databases[0].list-options LIST_OPTIONS]
[--mysql-databases[0].mysql-command MYSQL_COMMAND]
[--mysql-databases[0].mysql-dump-command MYSQL_DUMP_COMMAND]
[--mysql-databases[0].name NAME]
[--mysql-databases[0].options OPTIONS]
[--mysql-databases[0].password PASSWORD]
[--mysql-databases[0].password-transport PASSWORD_TRANSPORT]
[--mysql-databases[0].port PORT]
[--mysql-databases[0].restore-hostname RESTORE_HOSTNAME]
[--mysql-databases[0].restore-options RESTORE_OPTIONS]
[--mysql-databases[0].restore-password RESTORE_PASSWORD]
[--mysql-databases[0].restore-port RESTORE_PORT]
[--mysql-databases[0].restore-tls]
[--mysql-databases[0].no-restore-tls]
[--mysql-databases[0].restore-username RESTORE_USERNAME]
[--mysql-databases[0].tls] [--mysql-databases[0].no-tls]
[--mysql-databases[0].username USERNAME]
[--mysql-databases MYSQL_DATABASES]
[--ntfy.access-token ACCESS_TOKEN]
[--ntfy.fail.message MESSAGE] [--ntfy.fail.priority PRIORITY]
[--ntfy.fail.tags TAGS] [--ntfy.fail.title TITLE]
[--ntfy.finish.message MESSAGE]
[--ntfy.finish.priority PRIORITY] [--ntfy.finish.tags TAGS]
[--ntfy.finish.title TITLE] [--ntfy.password PASSWORD]
[--ntfy.server SERVER] [--ntfy.start.message MESSAGE]
[--ntfy.start.priority PRIORITY] [--ntfy.start.tags TAGS]
[--ntfy.start.title TITLE] [--ntfy.states[0] STATES[0]]
[--ntfy.states STATES] [--ntfy.topic TOPIC]
[--ntfy.username USERNAME] [--numeric-ids] [--no-numeric-ids]
[--on-error[0] ON_ERROR[0]] [--on-error ON_ERROR]
[--one-file-system] [--no-one-file-system]
[--pagerduty.integration-key INTEGRATION_KEY]
[--pagerduty.send-logs] [--pagerduty.no-send-logs]
[--patterns[0] PATTERNS[0]] [--patterns PATTERNS]
[--patterns-from[0] PATTERNS_FROM[0]]
[--patterns-from PATTERNS_FROM]
[--postgresql-databases[0].analyze-options ANALYZE_OPTIONS]
[--postgresql-databases[0].compression COMPRESSION]
[--postgresql-databases[0].format FORMAT]
[--postgresql-databases[0].hostname HOSTNAME]
[--postgresql-databases[0].list-options LIST_OPTIONS]
[--postgresql-databases[0].name NAME]
[--postgresql-databases[0].no-owner]
[--postgresql-databases[0].owner]
[--postgresql-databases[0].options OPTIONS]
[--postgresql-databases[0].password PASSWORD]
[--postgresql-databases[0].pg-dump-command PG_DUMP_COMMAND]
[--postgresql-databases[0].pg-restore-command PG_RESTORE_COMMAND]
[--postgresql-databases[0].port PORT]
[--postgresql-databases[0].psql-command PSQL_COMMAND]
[--postgresql-databases[0].restore-hostname RESTORE_HOSTNAME]
[--postgresql-databases[0].restore-options RESTORE_OPTIONS]
[--postgresql-databases[0].restore-password RESTORE_PASSWORD]
[--postgresql-databases[0].restore-port RESTORE_PORT]
[--postgresql-databases[0].restore-username RESTORE_USERNAME]
[--postgresql-databases[0].ssl-cert SSL_CERT]
[--postgresql-databases[0].ssl-crl SSL_CRL]
[--postgresql-databases[0].ssl-key SSL_KEY]
[--postgresql-databases[0].ssl-mode SSL_MODE]
[--postgresql-databases[0].ssl-root-cert SSL_ROOT_CERT]
[--postgresql-databases[0].username USERNAME]
[--postgresql-databases POSTGRESQL_DATABASES]
[--prefix PREFIX] [--pushover.fail.device DEVICE]
[--pushover.fail.expire EXPIRE] [--pushover.fail.html]
[--pushover.fail.no-html] [--pushover.fail.message MESSAGE]
[--pushover.fail.priority PRIORITY]
[--pushover.fail.retry RETRY] [--pushover.fail.sound SOUND]
[--pushover.fail.title TITLE] [--pushover.fail.ttl TTL]
[--pushover.fail.url URL]
[--pushover.fail.url-title URL_TITLE]
[--pushover.finish.device DEVICE]
[--pushover.finish.expire EXPIRE] [--pushover.finish.html]
[--pushover.finish.no-html]
[--pushover.finish.message MESSAGE]
[--pushover.finish.priority PRIORITY]
[--pushover.finish.retry RETRY]
[--pushover.finish.sound SOUND]
[--pushover.finish.title TITLE] [--pushover.finish.ttl TTL]
[--pushover.finish.url URL]
[--pushover.finish.url-title URL_TITLE]
[--pushover.start.device DEVICE]
[--pushover.start.expire EXPIRE] [--pushover.start.html]
[--pushover.start.no-html] [--pushover.start.message MESSAGE]
[--pushover.start.priority PRIORITY]
[--pushover.start.retry RETRY] [--pushover.start.sound SOUND]
[--pushover.start.title TITLE] [--pushover.start.ttl TTL]
[--pushover.start.url URL]
[--pushover.start.url-title URL_TITLE] [--pushover.states[0]
STATES[0]] [--pushover.states STATES]
[--pushover.token TOKEN] [--pushover.user USER]
[--read-special] [--no-read-special]
[--recompress RECOMPRESS] [--relocated-repo-access-is-ok]
[--no-relocated-repo-access-is-ok]
[--remote-path REMOTE_PATH] [--repositories[0].append-only]
[--repositories[0].no-append-only]
[--repositories[0].encryption ENCRYPTION]
[--repositories[0].label LABEL]
[--repositories[0].make-parent-directories]
[--repositories[0].no-make-parent-directories]
[--repositories[0].path PATH]
[--repositories[0].storage-quota STORAGE_QUOTA]
[--repositories REPOSITORIES] [--retries RETRIES]
[--retry-wait RETRY_WAIT]
[--sentry.data-source-name-url DATA_SOURCE_NAME_URL]
[--sentry.monitor-slug MONITOR_SLUG] [--sentry.states[0]
STATES[0]] [--sentry.states STATES] [--skip-actions[0]
SKIP_ACTIONS[0]] [--skip-actions SKIP_ACTIONS]
[--source-directories[0] SOURCE_DIRECTORIES[0]]
[--source-directories SOURCE_DIRECTORIES]
[--source-directories-must-exist]
[--no-source-directories-must-exist]
[--sqlite-databases[0].name NAME]
[--sqlite-databases[0].path PATH]
[--sqlite-databases[0].restore-path RESTORE_PATH]
[--sqlite-databases[0].sqlite-command SQLITE_COMMAND]
[--sqlite-databases[0].sqlite-restore-command SQLITE_RESTORE_COMMAND]
[--sqlite-databases SQLITE_DATABASES]
[--ssh-command SSH_COMMAND]
[--syslog-verbosity SYSLOG_VERBOSITY]
[--temporary-directory TEMPORARY_DIRECTORY] [--umask UMASK]
[--unknown-unencrypted-repo-access-is-ok]
[--no-unknown-unencrypted-repo-access-is-ok]
[--upload-buffer-size UPLOAD_BUFFER_SIZE]
[--upload-rate-limit UPLOAD_RATE_LIMIT]
[--uptime-kuma.push-url PUSH_URL] [--uptime-kuma.states[0]
STATES[0]] [--uptime-kuma.states STATES]
[--uptime-kuma.verify-tls] [--uptime-kuma.no-verify-tls]
[--use-chunks-archive] [--no-use-chunks-archive]
[--user-runtime-directory USER_RUNTIME_DIRECTORY]
[--user-state-directory USER_STATE_DIRECTORY] [-v VERBOSITY]
[--working-directory WORKING_DIRECTORY]
[--zabbix.api-key API_KEY] [--zabbix.fail.value VALUE]
[--zabbix.finish.value VALUE] [--zabbix.host HOST]
[--zabbix.itemid ITEMID] [--zabbix.key KEY]
[--zabbix.password PASSWORD] [--zabbix.server SERVER]
[--zabbix.start.value VALUE] [--zabbix.states[0] STATES[0]]
[--zabbix.states STATES] [--zabbix.username USERNAME]
[--zfs.mount-command MOUNT_COMMAND]
[--zfs.umount-command UMOUNT_COMMAND]
[--zfs.zfs-command ZFS_COMMAND]
...
Simple, configuration-driven backup software for servers and workstations. If
no actions are given, then borgmatic defaults to: create, prune, compact, and
check.
options:
-h, --help show this help message and exit
global arguments:
-c CONFIG_PATHS, --config CONFIG_PATHS
Configuration filename or directory, can specify flag
multiple times, defaults to: -c
/etc/borgmatic/config.yaml -c /etc/borgmatic.d -c
$HOME/.config/borgmatic/config.yaml -c
$HOME/.config/borgmatic.d
-n, --dry-run Go through the motions, but do not actually write to
any repositories
--override OPTION.SUBOPTION=VALUE
Deprecated. Configuration file option to override with
specified value, see documentation for overriding list
or key/value options, can specify flag multiple times
--no-environment-interpolation
Do not resolve environment variables in configuration
files
--bash-completion Show bash completion script and exit
--fish-completion Show fish completion script and exit
--version Display installed version number of borgmatic and exit
--after-actions[0] AFTER_ACTIONS[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--after-actions AFTER_ACTIONS
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute after all
actions for each repository. Example value: "[echo
Finished actions.]"
--after-backup[0] AFTER_BACKUP[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--after-backup AFTER_BACKUP
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute after
creating a backup, run once per repository. Example
value: "[echo Finished a backup.]"
--after-check[0] AFTER_CHECK[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--after-check AFTER_CHECK
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute after
consistency checks, run once per repository. Example
value: "[echo Finished checks.]"
--after-compact[0] AFTER_COMPACT[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--after-compact AFTER_COMPACT
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute after
compaction, run once per repository. Example value:
"[echo Finished compaction.]"
--after-everything[0] AFTER_EVERYTHING[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--after-everything AFTER_EVERYTHING
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute after
running all actions (if one of them is "create").
These are collected from all configuration files and
then run once after all of them (after any action).
Example value: "[echo Completed actions.]"
--after-extract[0] AFTER_EXTRACT[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--after-extract AFTER_EXTRACT
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute after
extracting a backup, run once per repository. Example
value: "[echo Finished extracting.]"
--after-prune[0] AFTER_PRUNE[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--after-prune AFTER_PRUNE
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute after
pruning, run once per repository. Example value:
"[echo Finished pruning.]"
--apprise.fail.body BODY
Specify the message body.
--apprise.fail.title TITLE
Specify the message title. If left unspecified, no
title is sent.
--apprise.finish.body BODY
Specify the message body.
--apprise.finish.title TITLE
Specify the message title. If left unspecified, no
title is sent.
--apprise.log.body BODY
Specify the message body.
--apprise.log.title TITLE
Specify the message title. If left unspecified, no
title is sent.
--apprise.logs-size-limit LOGS_SIZE_LIMIT
Number of bytes of borgmatic logs to send to Apprise
services. Set to 0 to send all logs and disable this
truncation. Defaults to 1500.
--apprise.send-logs Send borgmatic logs to Apprise services as part of the
"finish", "fail", and "log" states. Defaults to true.
--apprise.no-send-logs
Set the --apprise.send-logs value to false.
--apprise.services[0].label LABEL
Label used in borgmatic logs for this Apprise service.
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--apprise.services[0].url URL
URL of this Apprise service. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--apprise.services SERVICES
A list of Apprise services to publish to with URLs and
labels. The labels are used for logging. A full list
of services and their configuration can be found at
https://github.com/caronc/apprise/wiki. Example value:
"[{label: kodi, url: 'kodi://user@hostname'}, {label:
line, url: 'line://Token@User'}]"
--apprise.start.body BODY
Specify the message body.
--apprise.start.title TITLE
Specify the message title. If left unspecified, no
title is sent.
--apprise.states[0] STATES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--apprise.states STATES
List of one or more monitoring states to ping for:
"start", "finish", "fail", and/or "log". Defaults to
pinging for failure only. For each selected state,
corresponding configuration for the message title and
body should be given. If any is left unspecified, a
generic message is emitted instead. Example value:
"[start, finish]"
--archive-name-format ARCHIVE_NAME_FORMAT
Name of the archive to create. Borg placeholders can
be used. See the output of "borg help placeholders"
for details. Defaults to
"{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}" with Borg 1
and "{hostname}" with Borg 2, as Borg 2 does not
require unique archive names; identical archive names
form a common "series" that can be targeted together.
When running actions like repo-list, info, or check,
borgmatic automatically tries to match only archives
created with this name format.
--atime Store atime into archive. Defaults to true in Borg <
1.2, false in Borg 1.2+.
--no-atime Set the --atime value to false.
--before-actions[0] BEFORE_ACTIONS[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--before-actions BEFORE_ACTIONS
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute before all
the actions for each repository. Example value: "[echo
Starting actions.]"
--before-backup[0] BEFORE_BACKUP[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--before-backup BEFORE_BACKUP
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute before
creating a backup, run once per repository. Example
value: "[echo Starting a backup.]"
--before-check[0] BEFORE_CHECK[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--before-check BEFORE_CHECK
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute before
consistency checks, run once per repository. Example
value: "[echo Starting checks.]"
--before-compact[0] BEFORE_COMPACT[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--before-compact BEFORE_COMPACT
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute before
compaction, run once per repository. Example value:
"[echo Starting compaction.]"
--before-everything[0] BEFORE_EVERYTHING[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--before-everything BEFORE_EVERYTHING
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute before
running all actions (if one of them is "create").
These are collected from all configuration files and
then run once before all of them (prior to all
actions). Example value: "[echo Starting actions.]"
--before-extract[0] BEFORE_EXTRACT[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--before-extract BEFORE_EXTRACT
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute before
extracting a backup, run once per repository. Example
value: "[echo Starting extracting.]"
--before-prune[0] BEFORE_PRUNE[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--before-prune BEFORE_PRUNE
Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute before
pruning, run once per repository. Example value:
"[echo Starting pruning.]"
--birthtime Store birthtime (creation date) into archive. Defaults
to true.
--no-birthtime Set the --birthtime value to false.
--bootstrap.store-config-files
Store configuration files used to create a backup
inside the backup itself. Defaults to true. Changing
this to false prevents "borgmatic bootstrap" from
extracting configuration files from the backup.
--bootstrap.no-store-config-files
Set the --bootstrap.store-config-files value to false.
--borg-base-directory BORG_BASE_DIRECTORY
Base path used for various Borg directories. Defaults
to $HOME, ~$USER, or ~.
--borg-cache-directory BORG_CACHE_DIRECTORY
Path for Borg cache files. Defaults to
$borg_base_directory/.cache/borg
--borg-config-directory BORG_CONFIG_DIRECTORY
Path for Borg configuration files. Defaults to
$borg_base_directory/.config/borg
--borg-exit-codes[0].code CODE
The exit code for an existing Borg warning or error.
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--borg-exit-codes[0].treat-as TREAT_AS
Whether to consider the exit code as an error or as a
warning in borgmatic. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--borg-exit-codes BORG_EXIT_CODES
A list of Borg exit codes that should be elevated to
errors or squashed to warnings as indicated. By
default, Borg error exit codes (2 to 99) are treated
as errors while warning exit codes (1 and 100+) are
treated as warnings. Exit codes other than 1 and 2 are
only present in Borg 1.4.0+. Example value: "[{code:
13, treat_as: warning}, {code: 100, treat_as: error}]"
--borg-files-cache-ttl BORG_FILES_CACHE_TTL
Maximum time to live (ttl) for entries in the Borg
files cache.
--borg-keys-directory BORG_KEYS_DIRECTORY
Path for Borg encryption key files. Defaults to
$borg_base_directory/.config/borg/keys
--borg-security-directory BORG_SECURITY_DIRECTORY
Path for Borg security and encryption nonce files.
Defaults to $borg_base_directory/.config/borg/security
--borgmatic-source-directory BORGMATIC_SOURCE_DIRECTORY
Deprecated. Only used for locating database dumps and
bootstrap metadata within backup archives created
prior to deprecation. Replaced by
user_runtime_directory and user_state_directory.
Defaults to ~/.borgmatic
--btrfs.btrfs-command BTRFS_COMMAND
Command to use instead of "btrfs".
--btrfs.findmnt-command FINDMNT_COMMAND
Command to use instead of "findmnt".
--check-i-know-what-i-am-doing
Bypass Borg confirmation about check with repair
option. Defaults to false and an interactive prompt
from Borg.
--no-check-i-know-what-i-am-doing
Set the --check-i-know-what-i-am-doing value to false.
--check-last CHECK_LAST
Restrict the number of checked archives to the last n.
Applies only to the "archives" check. Defaults to
checking all archives.
--check-repositories[0] CHECK_REPOSITORIES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--check-repositories CHECK_REPOSITORIES
Paths or labels for a subset of the configured
"repositories" (see above) on which to run consistency
checks. Handy in case some of your repositories are
very large, and so running consistency checks on them
would take too long. Defaults to running consistency
checks on all configured repositories. Example value:
"['user@backupserver:sourcehostname.borg']"
--checkpoint-interval CHECKPOINT_INTERVAL
Number of seconds between each checkpoint during a
long-running backup. See
https://borgbackup.readthedocs.io/en/stable/faq.html
for details. Defaults to checkpoints every 1800
seconds (30 minutes).
--checkpoint-volume CHECKPOINT_VOLUME
Number of backed up bytes between each checkpoint
during a long-running backup. Only supported with Borg
2+. See
https://borgbackup.readthedocs.io/en/stable/faq.html
for details. Defaults to only time-based checkpointing
(see "checkpoint_interval") instead of volume-based
checkpointing.
--checks[0].frequency FREQUENCY
How frequently to run this type of consistency check
(as a best effort). The value is a number followed by
a unit of time. E.g., "2 weeks" to run this
consistency check no more than every two weeks for a
given repository or "1 month" to run it no more than
monthly. Defaults to "always": running this check
every time checks are run. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--checks[0].count-tolerance-percentage COUNT_TOLERANCE_PERCENTAGE
The percentage delta between the source directories
file count and the most recent backup archive file
count that is allowed before the entire consistency
check fails. This can catch problems like incorrect
excludes, inadvertent deletes, etc. Required (and only
valid) for the "spot" check. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--checks[0].name NAME
Name of the consistency check to run: * "repository"
checks the consistency of the repository. * "archives"
checks all of the archives. * "data" verifies the
integrity of the data within the archives and implies
the "archives" check as well. * "spot" checks that
some percentage of source files are found in the most
recent archive (with identical contents). * "extract"
does an extraction dry-run of the most recent archive.
* See "skip_actions" for disabling checks altogether.
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--checks[0].max-duration MAX_DURATION
How many seconds to check the repository before
interrupting the check. Useful for splitting a long-
running repository check into multiple partial checks.
Defaults to no interruption. Only applies to the
"repository" check, does not check the repository
index and is not compatible with the "--repair" flag.
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--checks[0].data-sample-percentage DATA_SAMPLE_PERCENTAGE
The percentage of total files in the source
directories to randomly sample and compare to their
corresponding files in the most recent backup archive.
Required (and only valid) for the "spot" check. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--checks[0].only-run-on[0] ONLY_RUN_ON[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--checks[0].only-run-on ONLY_RUN_ON
After the "frequency" duration has elapsed, only run
this check if the current day of the week matches one
of these values (the name of a day of the week in the
current locale). "weekday" and "weekend" are also
accepted. Defaults to running the check on any day of
the week. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.). Example value: "[Saturday, Sunday]"
--checks[0].data-tolerance-percentage DATA_TOLERANCE_PERCENTAGE
The percentage of total files in the source
directories that can fail a spot check comparison
without failing the entire consistency check. This can
catch problems like source files that have been bulk-
changed by malware, backups that have been tampered
with, etc. The value must be lower than or equal to
the "contents_sample_percentage". Required (and only
valid) for the "spot" check. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--checks[0].xxh64sum-command XXH64SUM_COMMAND
Command to use instead of "xxh64sum" to hash source
files, usually found in an OS package named "xxhash".
Do not substitute with a different hash type (SHA,
MD5, etc.) or the check will never succeed. Only valid
for the "spot" check. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--checks CHECKS List of one or more consistency checks to run on a
periodic basis (if "frequency" is set) or every time
borgmatic runs checks (if "frequency" is omitted).
Example value: "[{frequency: 2 weeks, name: archives},
{name: repository}]"
--chunker-params CHUNKER_PARAMS
Specify the parameters passed to the chunker
(CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS,
HASH_WINDOW_SIZE). See https://borgbackup.readthedocs.
io/en/stable/internals.html for details. Defaults to
"19,23,21,4095".
--color Apply color to console output. Defaults to true.
--no-color Set the --color value to false.
--commands[0].before BEFORE
Name for the point in borgmatic's execution that the
commands should be run before (required if "after"
isn't set): * "action" runs before each action for
each repository. * "repository" runs before all
actions for each repository. * "configuration" runs
before all actions and repositories in the current
configuration file. * "everything" runs before all
configuration files. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--commands[0].after AFTER
Name for the point in borgmatic's execution that the
commands should be run after (required if "before"
isn't set): * "action" runs after each action for each
repository. * "repository" runs after all actions for
each repository. * "configuration" runs after all
actions and repositories in the current configuration
file. * "everything" runs after all configuration
files. * "error" runs after an error occurs. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--commands[0].run[0] RUN[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--commands[0].run RUN
List of one or more shell commands or scripts to run
when this command hook is triggered. Required. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.). Example
value: "[echo Doing stuff.]"
--commands[0].when[0] WHEN[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--commands[0].when WHEN
Only trigger the hook when borgmatic is run with
particular actions listed here. Defaults to running
for all actions. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.). Example value: "[create, prune, compact,
check]"
--commands[0].states[0] STATES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--commands[0].states STATES
Only trigger the hook if borgmatic encounters one of
the states (execution results) listed here, where: *
"finish": No errors occurred. * "fail": An error
occurred. This state is evaluated only for the scope
of the configured "action", "repository", etc., rather
than for the entire borgmatic run. Only available for
"after" hooks. Defaults to running the hook for all
states. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.). Example value: "[finish]"
--commands COMMANDS List of one or more command hooks to execute,
triggered at particular points during borgmatic's
execution. For each command hook, specify one of
"before" or "after", not both. Example value:
"[{before: action, run: [echo Backing up.], when:
[create]}]"
--compact-threshold COMPACT_THRESHOLD
Minimum saved space percentage threshold for
compacting a segment, defaults to 10.
--compression COMPRESSION
Type of compression to use when creating archives.
(Compression level can be added separated with a
comma, like "zstd,7".) See http://borgbackup.readthedo
cs.io/en/stable/usage/create.html for details.
Defaults to "lz4".
--constants CONSTANTS
Constants to use in the configuration file. Within
option values, all occurrences of the constant name in
curly braces will be replaced with the constant value.
For example, if you have a constant named "app_name"
with the value "myapp", then the string "{app_name}"
will be replaced with "myapp" in the configuration
file. Example value: "{app_name: myapp, user: myuser}"
--container.secrets-directory SECRETS_DIRECTORY
Secrets directory to use instead of "/run/secrets".
--cronhub.ping-url PING_URL
Cronhub ping URL to notify when a backup begins, ends,
or errors.
--cronitor.ping-url PING_URL
Cronitor ping URL to notify when a backup begins,
ends, or errors.
--ctime Store ctime into archive. Defaults to true.
--no-ctime Set the --ctime value to false.
--debug-passphrase When set true, display debugging information that
includes passphrases used and passphrase related
environment variables set. Defaults to false.
--no-debug-passphrase
Set the --debug-passphrase value to false.
--default-actions Whether to apply default actions (create, prune,
compact and check) when no arguments are supplied to
the borgmatic command. If set to false, borgmatic
displays the help message instead.
--no-default-actions Set the --default-actions value to false.
--display-passphrase When set true, always shows passphrase and its hex
UTF-8 byte sequence. Defaults to false.
--no-display-passphrase
Set the --display-passphrase value to false.
--encryption-passcommand ENCRYPTION_PASSCOMMAND
The standard output of this command is used to unlock
the encryption key. Only use on repositories that were
initialized with passcommand/repokey/keyfile
encryption. Note that if both encryption_passcommand
and encryption_passphrase are set, then
encryption_passphrase takes precedence. This can also
be used to access encrypted systemd service
credentials. Defaults to not set. For more details,
see: https://torsion.org/borgmatic/docs/how-
to/provide-your-passwords/
--encryption-passphrase ENCRYPTION_PASSPHRASE
Passphrase to unlock the encryption key with. Only use
on repositories that were initialized with
passphrase/repokey/keyfile encryption. Quote the value
if it contains punctuation, so it parses correctly.
And backslash any quote or backslash literals as well.
Defaults to not set. Supports the "{credential ...}"
syntax.
--exclude-caches Exclude directories that contain a CACHEDIR.TAG file.
See http://www.brynosaurus.com/cachedir/spec.html for
details. Defaults to false.
--no-exclude-caches Set the --exclude-caches value to false.
--exclude-from[0] EXCLUDE_FROM[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--exclude-from EXCLUDE_FROM
Read exclude patterns from one or more separate named
files, one pattern per line. See the output of "borg
help patterns" for more details. Example value:
"[/etc/borgmatic/excludes]"
--exclude-if-present[0] EXCLUDE_IF_PRESENT[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--exclude-if-present EXCLUDE_IF_PRESENT
Exclude directories that contain a file with the given
filenames. Defaults to not set. Example value:
"[.nobackup]"
--exclude-nodump Exclude files with the NODUMP flag. Defaults to false.
--no-exclude-nodump Set the --exclude-nodump value to false.
--exclude-patterns[0] EXCLUDE_PATTERNS[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--exclude-patterns EXCLUDE_PATTERNS
Any paths matching these patterns are excluded from
backups. Globs and tildes are expanded. Note that a
glob pattern must either start with a glob or be an
absolute path. Do not backslash spaces in path names.
See the output of "borg help patterns" for more
details. Example value: "['*.pyc', /home/*/.cache,
'*/.vim*.tmp', /etc/ssl, /home/user/path with spaces]"
--extra-borg-options.check CHECK
Extra command-line options to pass to "borg check".
--extra-borg-options.compact COMPACT
Extra command-line options to pass to "borg compact".
--extra-borg-options.create CREATE
Extra command-line options to pass to "borg create".
--extra-borg-options.init INIT
Extra command-line options to pass to "borg init".
--extra-borg-options.prune PRUNE
Extra command-line options to pass to "borg prune".
--files-cache FILES_CACHE
Mode in which to operate the files cache. See http://b
orgbackup.readthedocs.io/en/stable/usage/create.html
for details. Defaults to "ctime,size,inode".
--flags Record filesystem flags (e.g. NODUMP, IMMUTABLE) in
archive. Defaults to true.
--no-flags Set the --flags value to false.
--healthchecks.create-slug
Create the check if it does not exist. Only works with
the slug URL scheme (https://hc-ping.com/<ping-
key>/<slug> as opposed to https://hc-ping.com/<uuid>).
Defaults to false.
--healthchecks.no-create-slug
Set the --healthchecks.create-slug value to false.
--healthchecks.ping-body-limit PING_BODY_LIMIT
Number of bytes of borgmatic logs to send to
Healthchecks, ideally the same as PING_BODY_LIMIT
configured on the Healthchecks server. Set to 0 to
send all logs and disable this truncation. Defaults to
100000.
--healthchecks.ping-url PING_URL
Healthchecks ping URL or UUID to notify when a backup
begins, ends, errors, or to send only logs.
--healthchecks.send-logs
Send borgmatic logs to Healthchecks as part of the
"finish", "fail", and "log" states. Defaults to true.
--healthchecks.no-send-logs
Set the --healthchecks.send-logs value to false.
--healthchecks.states[0] STATES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--healthchecks.states STATES
List of one or more monitoring states to ping for:
"start", "finish", "fail", and/or "log". Defaults to
pinging for all states. Example value: "[finish]"
--healthchecks.verify-tls
Verify the TLS certificate of the ping URL host.
Defaults to true.
--healthchecks.no-verify-tls
Set the --healthchecks.verify-tls value to false.
--keep-13weekly KEEP_13WEEKLY
Number of quarterly archives to keep (13 week
strategy).
--keep-3monthly KEEP_3MONTHLY
Number of quarterly archives to keep (3 month
strategy).
--keep-daily KEEP_DAILY
Number of daily archives to keep.
--keep-exclude-tags If true, the exclude_if_present filename is included
in backups. Defaults to false, meaning that the
exclude_if_present filename is omitted from backups.
--no-keep-exclude-tags
Set the --keep-exclude-tags value to false.
--keep-hourly KEEP_HOURLY
Number of hourly archives to keep.
--keep-minutely KEEP_MINUTELY
Number of minutely archives to keep.
--keep-monthly KEEP_MONTHLY
Number of monthly archives to keep.
--keep-secondly KEEP_SECONDLY
Number of secondly archives to keep.
--keep-weekly KEEP_WEEKLY
Number of weekly archives to keep.
--keep-within KEEP_WITHIN
Keep all archives within this time interval. See
"skip_actions" for disabling pruning altogether.
--keep-yearly KEEP_YEARLY
Number of yearly archives to keep.
--keepassxc.keepassxc-cli-command KEEPASSXC_CLI_COMMAND
Command to use instead of "keepassxc-cli".
--keepassxc.key-file KEY_FILE
Path to a key file for unlocking the KeePassXC
database.
--keepassxc.yubikey YUBIKEY
YubiKey slot and optional serial number used to access
the KeePassXC database. The format is
"<slot[:serial]>", where: * <slot> is the YubiKey slot
number (e.g., `1` or `2`). * <serial> (optional) is
the YubiKey's serial number (e.g., `7370001`).
--local-path LOCAL_PATH
Alternate Borg local executable. Defaults to "borg".
--lock-wait LOCK_WAIT
Maximum seconds to wait for acquiring a
repository/cache lock. Defaults to 1.
--log-file LOG_FILE Write log messages to the file at this path.
--log-file-format LOG_FILE_FORMAT
Python format string used for log messages written to
the log file.
--log-file-verbosity LOG_FILE_VERBOSITY
Log verbose output to file: -2 (disabled), -1 (errors
only), 0 (warnings and responses to actions), 1 (info
about steps borgmatic is taking, the default), or 2
(debug).
--log-json Write Borg log messages and console output as one JSON
object per log line instead of formatted text.
Defaults to false.
--no-log-json Set the --log-json value to false.
--loki.labels LABELS Allows setting custom labels for the logging stream.
At least one label is required. "__hostname" gets
replaced by the machine hostname automatically.
"__config" gets replaced by the name of the
configuration file. "__config_path" gets replaced by
the full path of the configuration file. Example
value: "{app: borgmatic, config: __config, hostname:
__hostname}"
--loki.url URL Grafana loki log URL to notify when a backup begins,
ends, or fails.
--lvm.lsblk-command LSBLK_COMMAND
Command to use instead of "lsblk".
--lvm.lvcreate-command LVCREATE_COMMAND
Command to use instead of "lvcreate".
--lvm.lvremove-command LVREMOVE_COMMAND
Command to use instead of "lvremove".
--lvm.lvs-command LVS_COMMAND
Command to use instead of "lvs".
--lvm.mount-command MOUNT_COMMAND
Command to use instead of "mount".
--lvm.snapshot-size SNAPSHOT_SIZE
Size to allocate for each snapshot taken, including
the units to use for that size. Defaults to
"10%ORIGIN" (10% of the size of logical volume being
snapshotted). See the lvcreate "--size" and "--
extents" documentation for more information:
https://www.man7.org/linux/man-
pages/man8/lvcreate.8.html
--lvm.umount-command UMOUNT_COMMAND
Command to use instead of "umount".
--mariadb-databases[0].add-drop-database
Use the "--add-drop-database" flag with mariadb-dump,
causing the database to be dropped right before
restore. Defaults to true. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mariadb-databases[0].no-add-drop-database
Set the --mariadb-databases[0].add-drop-database value
to false.
--mariadb-databases[0].format FORMAT
Database dump output format. Currently only "sql" is
supported. Defaults to "sql" for a single database.
Or, when database name is "all" and format is blank,
dumps all databases to a single file. But if a format
is specified with an "all" database name, dumps each
database to a separate file of that format, allowing
more convenient restores of individual databases. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mariadb-databases[0].hostname HOSTNAME
Database hostname to connect to. Defaults to
connecting via local Unix socket. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mariadb-databases[0].list-options LIST_OPTIONS
Additional options to pass directly to the mariadb
command that lists available databases, without
performing any validation on them. See mariadb command
documentation for details. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mariadb-databases[0].mariadb-command MARIADB_COMMAND
Command to run instead of "mariadb". This can be used
to run a specific mariadb version (e.g., one inside a
running container). Defaults to "mariadb". To specify
a different list element, replace the "[0]" with
another array index ("[1]", "[2]", etc.).
--mariadb-databases[0].mariadb-dump-command MARIADB_DUMP_COMMAND
Command to use instead of "mariadb-dump". This can be
used to run a specific mariadb_dump version (e.g., one
inside a running container). If you run it from within
a container, make sure to mount the path in the
"user_runtime_directory" option from the host into the
container at the same location. Defaults to "mariadb-
dump". To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.).
--mariadb-databases[0].name NAME
Database name (required if using this hook). Or "all"
to dump all databases on the host. Note that using
this database hook implicitly enables read_special
(see above) to support dump and restore streaming. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mariadb-databases[0].options OPTIONS
Additional mariadb-dump options to pass directly to
the dump command, without performing any validation on
them. See mariadb-dump documentation for details. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mariadb-databases[0].password PASSWORD
Password with which to connect to the database.
Omitting a password will only work if MariaDB is
configured to trust the configured username without a
password. Supports the "{credential ...}" syntax. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mariadb-databases[0].password-transport PASSWORD_TRANSPORT
How to transmit database passwords from borgmatic to
the MariaDB client, one of: * "pipe": Securely
transmit passwords via anonymous pipe. Only works if
the database client is on the same host as borgmatic.
(The server can be somewhere else.) This is the
default value. * "environment": Transmit passwords via
environment variable. Potentially less secure than a
pipe, but necessary when the database client is
elsewhere, e.g. when "mariadb_dump_command" is
configured to "exec" into a container and run a client
there. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.).
--mariadb-databases[0].port PORT
Port to connect to. Defaults to 3306. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mariadb-databases[0].restore-hostname RESTORE_HOSTNAME
Database hostname to restore to. Defaults to the
"hostname" option. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mariadb-databases[0].restore-options RESTORE_OPTIONS
Additional options to pass directly to the mariadb
command that restores database dumps, without
performing any validation on them. See mariadb command
documentation for details. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mariadb-databases[0].restore-password RESTORE_PASSWORD
Password with which to connect to the restore
database. Defaults to the "password" option. Supports
the "{credential ...}" syntax. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--mariadb-databases[0].restore-port RESTORE_PORT
Port to restore to. Defaults to the "port" option. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mariadb-databases[0].restore-tls
Whether to TLS-encrypt data transmitted between the
client and restore server. The default varies based on
the MariaDB version. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mariadb-databases[0].no-restore-tls
Set the --mariadb-databases[0].restore-tls value to
false.
--mariadb-databases[0].restore-username RESTORE_USERNAME
Username with which to restore the database. Defaults
to the "username" option. Supports the "{credential
...}" syntax. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--mariadb-databases[0].tls
Whether to TLS-encrypt data transmitted between the
client and server. The default varies based on the
MariaDB version. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--mariadb-databases[0].no-tls
Set the --mariadb-databases[0].tls value to false.
--mariadb-databases[0].username USERNAME
Username with which to connect to the database.
Defaults to the username of the current user. Supports
the "{credential ...}" syntax. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--mariadb-databases MARIADB_DATABASES
List of one or more MariaDB databases to dump before
creating a backup, run once per configuration file.
The database dumps are added to your source
directories at runtime and streamed directly to Borg.
Requires mariadb-dump/mariadb commands. See
https://mariadb.com/kb/en/library/mysqldump/ for
details. Example value: "[{hostname:
database.example.org, name: users}]"
--mongodb-databases[0].authentication-database AUTHENTICATION_DATABASE
Authentication database where the specified username
exists. If no authentication database is specified,
the database provided in "name" is used. If "name" is
"all", the "admin" database is used. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mongodb-databases[0].format FORMAT
Database dump output format. One of "archive", or
"directory". Defaults to "archive". See mongodump
documentation for details. Note that format is ignored
when the database name is "all". To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mongodb-databases[0].hostname HOSTNAME
Database hostname to connect to. Defaults to
connecting to localhost. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mongodb-databases[0].mongodump-command MONGODUMP_COMMAND
Command to use instead of "mongodump". This can be
used to run a specific mongodump version (e.g., one
inside a running container). If you run it from within
a container, make sure to mount the path in the
"user_runtime_directory" option from the host into the
container at the same location. Defaults to
"mongodump". To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--mongodb-databases[0].mongorestore-command MONGORESTORE_COMMAND
Command to run when restoring a database instead of
"mongorestore". This can be used to run a specific
mongorestore version (e.g., one inside a running
container). Defaults to "mongorestore". To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mongodb-databases[0].name NAME
Database name (required if using this hook). Or "all"
to dump all databases on the host. Note that using
this database hook implicitly enables read_special
(see above) to support dump and restore streaming. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mongodb-databases[0].options OPTIONS
Additional mongodump options to pass directly to the
dump command, without performing any validation on
them. See mongodump documentation for details. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mongodb-databases[0].password PASSWORD
Password with which to connect to the database. Skip
it if no authentication is needed. Supports the
"{credential ...}" syntax. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mongodb-databases[0].port PORT
Port to connect to. Defaults to 27017. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mongodb-databases[0].restore-hostname RESTORE_HOSTNAME
Database hostname to restore to. Defaults to the
"hostname" option. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mongodb-databases[0].restore-options RESTORE_OPTIONS
Additional mongorestore options to pass directly to
the dump command, without performing any validation on
them. See mongorestore documentation for details. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mongodb-databases[0].restore-password RESTORE_PASSWORD
Password with which to connect to the restore
database. Defaults to the "password" option. Supports
the "{credential ...}" syntax. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--mongodb-databases[0].restore-port RESTORE_PORT
Port to restore to. Defaults to the "port" option. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mongodb-databases[0].restore-username RESTORE_USERNAME
Username with which to restore the database. Defaults
to the "username" option. Supports the "{credential
...}" syntax. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--mongodb-databases[0].username USERNAME
Username with which to connect to the database. Skip
it if no authentication is needed. Supports the
"{credential ...}" syntax. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mongodb-databases MONGODB_DATABASES
List of one or more MongoDB databases to dump before
creating a backup, run once per configuration file.
The database dumps are added to your source
directories at runtime and streamed directly to Borg.
Requires mongodump/mongorestore commands. See
https://docs.mongodb.com/database-tools/mongodump/ and
https://docs.mongodb.com/database-tools/mongorestore/
for details. Example value: "[{hostname:
database.example.org, name: users}]"
--monitoring-verbosity MONITORING_VERBOSITY
When a monitoring integration supporting logging is
configured, log verbose output to it: -2 (disabled),
-1 (errors only), 0 (warnings and responses to
actions), 1 (info about steps borgmatic is taking, the
default), or 2 (debug).
--mysql-databases[0].add-drop-database
Use the "--add-drop-database" flag with mysqldump,
causing the database to be dropped right before
restore. Defaults to true. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mysql-databases[0].no-add-drop-database
Set the --mysql-databases[0].add-drop-database value
to false.
--mysql-databases[0].format FORMAT
Database dump output format. Currently only "sql" is
supported. Defaults to "sql" for a single database.
Or, when database name is "all" and format is blank,
dumps all databases to a single file. But if a format
is specified with an "all" database name, dumps each
database to a separate file of that format, allowing
more convenient restores of individual databases. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mysql-databases[0].hostname HOSTNAME
Database hostname to connect to. Defaults to
connecting via local Unix socket. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mysql-databases[0].list-options LIST_OPTIONS
Additional options to pass directly to the mysql
command that lists available databases, without
performing any validation on them. See mysql command
documentation for details. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mysql-databases[0].mysql-command MYSQL_COMMAND
Command to run instead of "mysql". This can be used to
run a specific mysql version (e.g., one inside a
running container). Defaults to "mysql". To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mysql-databases[0].mysql-dump-command MYSQL_DUMP_COMMAND
Command to use instead of "mysqldump". This can be
used to run a specific mysql_dump version (e.g., one
inside a running container). If you run it from within
a container, make sure to mount the path in the
"user_runtime_directory" option from the host into the
container at the same location. Defaults to
"mysqldump". To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--mysql-databases[0].name NAME
Database name (required if using this hook). Or "all"
to dump all databases on the host. Note that using
this database hook implicitly enables read_special
(see above) to support dump and restore streaming. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mysql-databases[0].options OPTIONS
Additional mysqldump options to pass directly to the
dump command, without performing any validation on
them. See mysqldump documentation for details. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mysql-databases[0].password PASSWORD
Password with which to connect to the database.
Omitting a password will only work if MySQL is
configured to trust the configured username without a
password. Supports the "{credential ...}" syntax. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mysql-databases[0].password-transport PASSWORD_TRANSPORT
How to transmit database passwords from borgmatic to
the MySQL client, one of: * "pipe": Securely transmit
passwords via anonymous pipe. Only works if the
database client is on the same host as borgmatic. (The
server can be somewhere else.) This is the default
value. * "environment": Transmit passwords via
environment variable. Potentially less secure than a
pipe, but necessary when the database client is
elsewhere, e.g. when "mysql_dump_command" is
configured to "exec" into a container and run a client
there. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.).
--mysql-databases[0].port PORT
Port to connect to. Defaults to 3306. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--mysql-databases[0].restore-hostname RESTORE_HOSTNAME
Database hostname to restore to. Defaults to the
"hostname" option. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mysql-databases[0].restore-options RESTORE_OPTIONS
Additional options to pass directly to the mysql
command that restores database dumps, without
performing any validation on them. See mysql command
documentation for details. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mysql-databases[0].restore-password RESTORE_PASSWORD
Password with which to connect to the restore
database. Defaults to the "password" option. Supports
the "{credential ...}" syntax. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--mysql-databases[0].restore-port RESTORE_PORT
Port to restore to. Defaults to the "port" option. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--mysql-databases[0].restore-tls
Whether to TLS-encrypt data transmitted between the
client and restore server. The default varies based on
the MySQL installation. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mysql-databases[0].no-restore-tls
Set the --mysql-databases[0].restore-tls value to
false.
--mysql-databases[0].restore-username RESTORE_USERNAME
Username with which to restore the database. Defaults
to the "username" option. Supports the "{credential
...}" syntax. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--mysql-databases[0].tls
Whether to TLS-encrypt data transmitted between the
client and server. The default varies based on the
MySQL installation. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--mysql-databases[0].no-tls
Set the --mysql-databases[0].tls value to false.
--mysql-databases[0].username USERNAME
Username with which to connect to the database.
Defaults to the username of the current user. Supports
the "{credential ...}" syntax. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--mysql-databases MYSQL_DATABASES
List of one or more MySQL databases to dump before
creating a backup, run once per configuration file.
The database dumps are added to your source
directories at runtime and streamed directly to Borg.
Requires mysqldump/mysql commands. See
https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html
for details. Example value: "[{hostname:
database.example.org, name: users}]"
--ntfy.access-token ACCESS_TOKEN
An ntfy access token to authenticate with instead of
username/password. Supports the "{credential ...}"
syntax.
--ntfy.fail.message MESSAGE
The message body to publish.
--ntfy.fail.priority PRIORITY
The priority to set.
--ntfy.fail.tags TAGS
Tags to attach to the message.
--ntfy.fail.title TITLE
The title of the message.
--ntfy.finish.message MESSAGE
The message body to publish.
--ntfy.finish.priority PRIORITY
The priority to set.
--ntfy.finish.tags TAGS
Tags to attach to the message.
--ntfy.finish.title TITLE
The title of the message.
--ntfy.password PASSWORD
The password used for authentication. Supports the
"{credential ...}" syntax.
--ntfy.server SERVER The address of your self-hosted ntfy.sh instance.
--ntfy.start.message MESSAGE
The message body to publish.
--ntfy.start.priority PRIORITY
The priority to set.
--ntfy.start.tags TAGS
Tags to attach to the message.
--ntfy.start.title TITLE
The title of the message.
--ntfy.states[0] STATES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--ntfy.states STATES List of one or more monitoring states to ping for:
"start", "finish", and/or "fail". Defaults to pinging
for failure only. Example value: "[start, finish]"
--ntfy.topic TOPIC The topic to publish to. See
https://ntfy.sh/docs/publish/ for details.
--ntfy.username USERNAME
The username used for authentication. Supports the
"{credential ...}" syntax.
--numeric-ids Only store/extract numeric user and group identifiers.
Defaults to false.
--no-numeric-ids Set the --numeric-ids value to false.
--on-error[0] ON_ERROR[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--on-error ON_ERROR Deprecated. Use "commands:" instead. List of one or
more shell commands or scripts to execute when an
exception occurs during a "create", "prune",
"compact", or "check" action or an associated
before/after hook. Example value: "[echo Error during
create/prune/compact/check.]"
--one-file-system Stay in same file system; do not cross mount points
beyond the given source directories. Defaults to
false.
--no-one-file-system Set the --one-file-system value to false.
--pagerduty.integration-key INTEGRATION_KEY
PagerDuty integration key used to notify PagerDuty
when a backup errors. Supports the "{credential ...}"
syntax.
--pagerduty.send-logs
Send borgmatic logs to PagerDuty when a backup errors.
Defaults to true.
--pagerduty.no-send-logs
Set the --pagerduty.send-logs value to false.
--patterns[0] PATTERNS[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--patterns PATTERNS Any paths matching these patterns are
included/excluded from backups. Globs are expanded.
(Tildes are not.) See the output of "borg help
patterns" for more details. Quote any value if it
contains leading punctuation, so it parses correctly.
Example value: "[R /, '- /home/*/.cache', +
/home/susan, '- /home/*']"
--patterns-from[0] PATTERNS_FROM[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--patterns-from PATTERNS_FROM
Read include/exclude patterns from one or more
separate named files, one pattern per line. See the
output of "borg help patterns" for more details.
Example value: "[/etc/borgmatic/patterns]"
--postgresql-databases[0].analyze-options ANALYZE_OPTIONS
Additional psql options to pass directly to the
analyze command run after a restore, without
performing any validation on them. See psql
documentation for details. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--postgresql-databases[0].compression COMPRESSION
Database dump compression level (integer) or method
("gzip", "lz4", "zstd", or "none") and optional colon-
separated detail. Defaults to moderate "gzip" for
"custom" and "directory" formats and no compression
for the "plain" format. Compression is not supported
for the "tar" format. Be aware that Borg does its own
compression as well, so you may not need it in both
places. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.).
--postgresql-databases[0].format FORMAT
Database dump output format. One of "plain", "custom",
"directory", or "tar". Defaults to "custom" (unlike
raw pg_dump) for a single database. Or, when database
name is "all" and format is blank, dumps all databases
to a single file. But if a format is specified with an
"all" database name, dumps each database to a separate
file of that format, allowing more convenient restores
of individual databases. See the pg_dump documentation
for more about formats. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--postgresql-databases[0].hostname HOSTNAME
Database hostname to connect to. Defaults to
connecting via local Unix socket. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--postgresql-databases[0].list-options LIST_OPTIONS
Additional psql options to pass directly to the psql
command that lists available databases, without
performing any validation on them. See psql
documentation for details. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--postgresql-databases[0].name NAME
Database name (required if using this hook). Or "all"
to dump all databases on the host. (Also set the
"format" to dump each database to a separate file
instead of one combined file.) Note that using this
database hook implicitly enables read_special (see
above) to support dump and restore streaming. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--postgresql-databases[0].no-owner
Do not output commands to set ownership of objects to
match the original database. By default, pg_dump and
pg_restore issue ALTER OWNER or SET SESSION
AUTHORIZATION statements to set ownership of created
schema elements. These statements will fail unless the
initial connection to the database is made by a
superuser. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--postgresql-databases[0].owner
Set the --postgresql-databases[0].no-owner value to
false.
--postgresql-databases[0].options OPTIONS
Additional pg_dump/pg_dumpall options to pass directly
to the dump command, without performing any validation
on them. See pg_dump documentation for details. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--postgresql-databases[0].password PASSWORD
Password with which to connect to the database.
Omitting a password will only work if PostgreSQL is
configured to trust the configured username without a
password or you create a ~/.pgpass file. Supports the
"{credential ...}" syntax. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--postgresql-databases[0].pg-dump-command PG_DUMP_COMMAND
Command to use instead of "pg_dump" or "pg_dumpall".
This can be used to run a specific pg_dump version
(e.g., one inside a running container). If you run it
from within a container, make sure to mount the path
in the "user_runtime_directory" option from the host
into the container at the same location. Defaults to
"pg_dump" for single database dump or "pg_dumpall" to
dump all databases. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--postgresql-databases[0].pg-restore-command PG_RESTORE_COMMAND
Command to use instead of "pg_restore". This can be
used to run a specific pg_restore version (e.g., one
inside a running container). Defaults to "pg_restore".
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--postgresql-databases[0].port PORT
Port to connect to. Defaults to 5432. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--postgresql-databases[0].psql-command PSQL_COMMAND
Command to use instead of "psql". This can be used to
run a specific psql version (e.g., one inside a
running container). Defaults to "psql". To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--postgresql-databases[0].restore-hostname RESTORE_HOSTNAME
Database hostname to restore to. Defaults to the
"hostname" option. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--postgresql-databases[0].restore-options RESTORE_OPTIONS
Additional pg_restore/psql options to pass directly to
the restore command, without performing any validation
on them. See pg_restore/psql documentation for
details. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.).
--postgresql-databases[0].restore-password RESTORE_PASSWORD
Password with which to connect to the restore
database. Defaults to the "password" option. Supports
the "{credential ...}" syntax. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--postgresql-databases[0].restore-port RESTORE_PORT
Port to restore to. Defaults to the "port" option. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--postgresql-databases[0].restore-username RESTORE_USERNAME
Username with which to restore the database. Defaults
to the "username" option. Supports the "{credential
...}" syntax. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--postgresql-databases[0].ssl-cert SSL_CERT
Path to a client certificate. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--postgresql-databases[0].ssl-crl SSL_CRL
Path to a certificate revocation list. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--postgresql-databases[0].ssl-key SSL_KEY
Path to a private client key. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--postgresql-databases[0].ssl-mode SSL_MODE
SSL mode to use to connect to the database server. One
of "disable", "allow", "prefer", "require", "verify-
ca" or "verify-full". Defaults to "disable". To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--postgresql-databases[0].ssl-root-cert SSL_ROOT_CERT
Path to a root certificate containing a list of
trusted certificate authorities. To specify a
different list element, replace the "[0]" with another
array index ("[1]", "[2]", etc.).
--postgresql-databases[0].username USERNAME
Username with which to connect to the database.
Defaults to the username of the current user. You
probably want to specify the "postgres" superuser here
when the database name is "all". Supports the
"{credential ...}" syntax. To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--postgresql-databases POSTGRESQL_DATABASES
List of one or more PostgreSQL databases to dump
before creating a backup, run once per configuration
file. The database dumps are added to your source
directories at runtime and streamed directly to Borg.
Requires pg_dump/pg_dumpall/pg_restore commands. See
https://www.postgresql.org/docs/current/app-
pgdump.html and
https://www.postgresql.org/docs/current/libpq-ssl.html
for details. Example value: "[{hostname:
database.example.org, name: users}]"
--prefix PREFIX Deprecated. When pruning or checking archives, only
consider archive names starting with this prefix. Borg
placeholders can be used. See the output of "borg help
placeholders" for details. If a prefix is not
specified, borgmatic defaults to matching archives
based on the archive_name_format (see above).
--pushover.fail.device DEVICE
The name of one of your devices to send just to that
device instead of all devices.
--pushover.fail.expire EXPIRE
How many seconds your notification will continue to be
retried (every retry seconds). Defaults to 600. This
settings only applies to priority 2 notifications.
--pushover.fail.html Set to True to enable HTML parsing of the message. Set
to false for plain text.
--pushover.fail.no-html
Set the --pushover.fail.html value to false.
--pushover.fail.message MESSAGE
Message to be sent to the user or group. If omitted
the default is the name of the state.
--pushover.fail.priority PRIORITY
A value of -2, -1, 0 (default), 1 or 2 that indicates
the message priority.
--pushover.fail.retry RETRY
The retry parameter specifies how often (in seconds)
the Pushover servers will send the same notification
to the user. Defaults to 30. This settings only
applies to priority 2 notifications.
--pushover.fail.sound SOUND
The name of a supported sound to override your default
sound choice. All options can be found here:
https://pushover.net/api#sounds
--pushover.fail.title TITLE
Your message's title, otherwise your app's name is
used.
--pushover.fail.ttl TTL
The number of seconds that the message will live,
before being deleted automatically. The ttl parameter
is ignored for messages with a priority. value of 2.
--pushover.fail.url URL
A supplementary URL to show with your message.
--pushover.fail.url-title URL_TITLE
A title for the URL specified as the url parameter,
otherwise just the URL is shown.
--pushover.finish.device DEVICE
The name of one of your devices to send just to that
device instead of all devices.
--pushover.finish.expire EXPIRE
How many seconds your notification will continue to be
retried (every retry seconds). Defaults to 600. This
settings only applies to priority 2 notifications.
--pushover.finish.html
Set to True to enable HTML parsing of the message. Set
to false for plain text.
--pushover.finish.no-html
Set the --pushover.finish.html value to false.
--pushover.finish.message MESSAGE
Message to be sent to the user or group. If omitted
the default is the name of the state.
--pushover.finish.priority PRIORITY
A value of -2, -1, 0 (default), 1 or 2 that indicates
the message priority.
--pushover.finish.retry RETRY
The retry parameter specifies how often (in seconds)
the Pushover servers will send the same notification
to the user. Defaults to 30. This settings only
applies to priority 2 notifications.
--pushover.finish.sound SOUND
The name of a supported sound to override your default
sound choice. All options can be found here:
https://pushover.net/api#sounds
--pushover.finish.title TITLE
Your message's title, otherwise your app's name is
used.
--pushover.finish.ttl TTL
The number of seconds that the message will live,
before being deleted automatically. The ttl parameter
is ignored for messages with a priority. value of 2.
--pushover.finish.url URL
A supplementary URL to show with your message.
--pushover.finish.url-title URL_TITLE
A title for the URL specified as the url parameter,
otherwise just the URL is shown.
--pushover.start.device DEVICE
The name of one of your devices to send just to that
device instead of all devices.
--pushover.start.expire EXPIRE
How many seconds your notification will continue to be
retried (every retry seconds). Defaults to 600. This
settings only applies to priority 2 notifications.
--pushover.start.html
Set to True to enable HTML parsing of the message. Set
to false for plain text.
--pushover.start.no-html
Set the --pushover.start.html value to false.
--pushover.start.message MESSAGE
Message to be sent to the user or group. If omitted
the default is the name of the state.
--pushover.start.priority PRIORITY
A value of -2, -1, 0 (default), 1 or 2 that indicates
the message priority.
--pushover.start.retry RETRY
The retry parameter specifies how often (in seconds)
the Pushover servers will send the same notification
to the user. Defaults to 30. This settings only
applies to priority 2 notifications.
--pushover.start.sound SOUND
The name of a supported sound to override your default
sound choice. All options can be found here:
https://pushover.net/api#sounds
--pushover.start.title TITLE
Your message's title, otherwise your app's name is
used.
--pushover.start.ttl TTL
The number of seconds that the message will live,
before being deleted automatically. The ttl parameter
is ignored for messages with a priority. value of 2.
--pushover.start.url URL
A supplementary URL to show with your message.
--pushover.start.url-title URL_TITLE
A title for the URL specified as the url parameter,
otherwise just the URL is shown.
--pushover.states[0] STATES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--pushover.states STATES
List of one or more monitoring states to ping for:
"start", "finish", and/or "fail". Defaults to pinging
for failure only. Example value: "[start, finish]"
--pushover.token TOKEN
Your application's API token. Supports the
"{credential ...}" syntax.
--pushover.user USER Your user/group key (or that of your target user),
viewable when logged into your dashboard: often
referred to as USER_KEY in Pushover documentation and
code examples. Supports the "{credential ...}" syntax.
--read-special Use Borg's --read-special flag to allow backup of
block and other special devices. Use with caution, as
it will lead to problems if used when backing up
special devices such as /dev/zero. Defaults to false.
But when a database hook is used, the setting here is
ignored and read_special is considered true.
--no-read-special Set the --read-special value to false.
--recompress RECOMPRESS
Mode for recompressing data chunks according to MODE.
Possible modes are: * "if-different": Recompress if
the current compression is with a different
compression algorithm. * "always": Recompress even if
the current compression is with the same compression
algorithm. Use this to change the compression level. *
"never": Do not recompress. Use this option to
explicitly prevent recompression. See https://borgback
up.readthedocs.io/en/stable/usage/recreate.html for
details. Defaults to "never".
--relocated-repo-access-is-ok
Bypass Borg error about a repository that has been
moved. Defaults to false.
--no-relocated-repo-access-is-ok
Set the --relocated-repo-access-is-ok value to false.
--remote-path REMOTE_PATH
Alternate Borg remote executable. Defaults to "borg".
--repositories[0].append-only
Whether the repository should be created append-only,
only used for the repo-create action. Defaults to
false. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.).
--repositories[0].no-append-only
Set the --repositories[0].append-only value to false.
--repositories[0].encryption ENCRYPTION
The encryption mode with which to create the
repository, only used for the repo-create action. To
see the available encryption modes, run "borg init
--help" with Borg 1 or "borg repo-create --help" with
Borg 2. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.).
--repositories[0].label LABEL
An optional label for the repository, used in logging
and to make selecting the repository easier on the
command-line. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--repositories[0].make-parent-directories
Whether any missing parent directories of the
repository path should be created, only used for the
repo-create action. Defaults to false. (This option is
supported for Borg 1.x only) To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--repositories[0].no-make-parent-directories
Set the --repositories[0].make-parent-directories
value to false.
--repositories[0].path PATH
The local path or Borg URL of the repository. To
specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--repositories[0].storage-quota STORAGE_QUOTA
The storage quota with which to create the repository,
only used for the repo-create action. Defaults to no
quota. To specify a different list element, replace
the "[0]" with another array index ("[1]", "[2]",
etc.).
--repositories REPOSITORIES
A required list of local or remote repositories with
paths and optional labels (which can be used with the
--repository flag to select a repository). Tildes are
expanded. Multiple repositories are backed up to in
sequence. Borg placeholders can be used. See the
output of "borg help placeholders" for details. See
ssh_command for SSH options like identity file or
port. If systemd service is used, then add local
repository paths in the systemd service file to the
ReadWritePaths list. Example value: "[{label:
backupserver, path:
'ssh://user@backupserver/./sourcehostname.borg'},
{label: local, path: /mnt/backup}]"
--retries RETRIES Number of times to retry a failing backup before
giving up. Defaults to 0 (i.e., does not attempt
retry).
--retry-wait RETRY_WAIT
Wait time between retries (in seconds) to allow
transient issues to pass. Increases after each retry
by that same wait time as a form of backoff. Defaults
to 0 (no wait).
--sentry.data-source-name-url DATA_SOURCE_NAME_URL
Sentry Data Source Name (DSN) URL, associated with a
particular Sentry project. Used to construct a cron
URL, notified when a backup begins, ends, or errors.
--sentry.monitor-slug MONITOR_SLUG
Sentry monitor slug, associated with a particular
Sentry project monitor. Used along with the data
source name URL to construct a cron URL.
--sentry.states[0] STATES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--sentry.states STATES
List of one or more monitoring states to ping for:
"start", "finish", and/or "fail". Defaults to pinging
for all states. Example value: "[start, finish]"
--skip-actions[0] SKIP_ACTIONS[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--skip-actions SKIP_ACTIONS
List of one or more actions to skip running for this
configuration file, even if specified on the command-
line (explicitly or implicitly). This is handy for
append-only configurations where you never want to run
"compact" or checkless configuration where you want to
skip "check". Defaults to not skipping any actions.
Example value: "[compact]"
--source-directories[0] SOURCE_DIRECTORIES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--source-directories SOURCE_DIRECTORIES
List of source directories and files to back up. Globs
and tildes are expanded. Do not backslash spaces in
path names. Example value: "[/home, /etc,
/var/log/syslog*, /home/user/path with spaces]"
--source-directories-must-exist
If true, then source directories (and root pattern
paths) must exist. If they don't, an error is raised.
Defaults to false.
--no-source-directories-must-exist
Set the --source-directories-must-exist value to
false.
--sqlite-databases[0].name NAME
This is used to tag the database dump file with a
name. It is not the path to the database file itself.
The name "all" has no special meaning for SQLite
databases. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--sqlite-databases[0].path PATH
Path to the SQLite database file to dump. If relative,
it is relative to the current working directory. Note
that using this database hook implicitly enables
read_special (see above) to support dump and restore
streaming. To specify a different list element,
replace the "[0]" with another array index ("[1]",
"[2]", etc.).
--sqlite-databases[0].restore-path RESTORE_PATH
Path to the SQLite database file to restore to.
Defaults to the "path" option. To specify a different
list element, replace the "[0]" with another array
index ("[1]", "[2]", etc.).
--sqlite-databases[0].sqlite-command SQLITE_COMMAND
Command to use instead of "sqlite3". This can be used
to run a specific sqlite3 version (e.g., one inside a
running container). If you run it from within a
container, make sure to mount the path in the
"user_runtime_directory" option from the host into the
container at the same location. Defaults to "sqlite3".
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--sqlite-databases[0].sqlite-restore-command SQLITE_RESTORE_COMMAND
Command to run when restoring a database instead of
"sqlite3". This can be used to run a specific sqlite3
version (e.g., one inside a running container).
Defaults to "sqlite3". To specify a different list
element, replace the "[0]" with another array index
("[1]", "[2]", etc.).
--sqlite-databases SQLITE_DATABASES
List of one or more SQLite databases to dump before
creating a backup, run once per configuration file.
The database dumps are added to your source
directories at runtime and streamed directly to Borg.
Requires the sqlite3 command. See
https://sqlite.org/cli.html for details. Example
value: "[{name: users, path: /var/lib/db.sqlite}]"
--ssh-command SSH_COMMAND
Command to use instead of "ssh". This can be used to
specify ssh options. Defaults to not set.
--syslog-verbosity SYSLOG_VERBOSITY
Log verbose output to syslog: -2 (disabled, the
default), -1 (errors only), 0 (warnings and responses
to actions), 1 (info about steps borgmatic is taking),
or 2 (debug).
--temporary-directory TEMPORARY_DIRECTORY
Directory where temporary Borg files are stored.
Defaults to $TMPDIR. See "Resource Usage" at https://b
orgbackup.readthedocs.io/en/stable/usage/general.html
for details.
--umask UMASK Umask used for when executing Borg or calling hooks.
Defaults to 0077 for Borg or the umask that borgmatic
is run with for hooks.
--unknown-unencrypted-repo-access-is-ok
Bypass Borg error about a previously unknown
unencrypted repository. Defaults to false.
--no-unknown-unencrypted-repo-access-is-ok
Set the --unknown-unencrypted-repo-access-is-ok value
to false.
--upload-buffer-size UPLOAD_BUFFER_SIZE
Size of network upload buffer in MiB. Defaults to no
buffer.
--upload-rate-limit UPLOAD_RATE_LIMIT
Remote network upload rate limit in kiBytes/second.
Defaults to unlimited.
--uptime-kuma.push-url PUSH_URL
Uptime Kuma push URL without query string (do not
include the question mark or anything after it).
--uptime-kuma.states[0] STATES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--uptime-kuma.states STATES
List of one or more monitoring states to push for:
"start", "finish", and/or "fail". Defaults to pushing
for all states. Example value: "[start, finish, fail]"
--uptime-kuma.verify-tls
Verify the TLS certificate of the push URL host.
Defaults to true.
--uptime-kuma.no-verify-tls
Set the --uptime-kuma.verify-tls value to false.
--use-chunks-archive Enables or disables the use of chunks.archive.d for
faster cache resyncs in Borg. If true, value is set to
"yes" (default) else it's set to "no", reducing disk
usage but slowing resyncs.
--no-use-chunks-archive
Set the --use-chunks-archive value to false.
--user-runtime-directory USER_RUNTIME_DIRECTORY
Path for storing temporary runtime data like streaming
database dumps and bootstrap metadata. borgmatic
automatically creates and uses a "borgmatic"
subdirectory here. Defaults to $XDG_RUNTIME_DIR or or
$TMPDIR or $TEMP or /run/user/$UID.
--user-state-directory USER_STATE_DIRECTORY
Path for storing borgmatic state files like records of
when checks last ran. borgmatic automatically creates
and uses a "borgmatic" subdirectory here. If you
change this option, borgmatic must create the check
records again (and therefore re-run checks). Defaults
to $XDG_STATE_HOME or ~/.local/state.
-v VERBOSITY, --verbosity VERBOSITY
Display verbose output to the console: -2 (disabled),
-1 (errors only), 0 (warnings and responses to
actions, the default), 1 (info about steps borgmatic
is taking), or 2 (debug).
--working-directory WORKING_DIRECTORY
Working directory to use when running actions, useful
for backing up using relative source directory paths.
Does not currently apply to borgmatic configuration
file paths or includes. Tildes are expanded. See http:
//borgbackup.readthedocs.io/en/stable/usage/create.htm
l for details. Defaults to not set.
--zabbix.api-key API_KEY
The API key used for authentication. Not needed if
using an username/password. Supports the "{credential
...}" syntax.
--zabbix.fail.value VALUE
The value to set the item to on fail.
--zabbix.finish.value VALUE
The value to set the item to on finish.
--zabbix.host HOST Host name where the item is stored. Required if
"itemid" is not set.
--zabbix.itemid ITEMID
The ID of the Zabbix item used for collecting data.
Unique across the entire Zabbix system.
--zabbix.key KEY Key of the host where the item is stored. Required if
"itemid" is not set.
--zabbix.password PASSWORD
The password used for authentication. Not needed if
using an API key. Supports the "{credential ...}"
syntax.
--zabbix.server SERVER
The API endpoint URL of your Zabbix instance, usually
ending with "/api_jsonrpc.php". Required.
--zabbix.start.value VALUE
The value to set the item to on start.
--zabbix.states[0] STATES[0]
To specify a different list element, replace the "[0]"
with another array index ("[1]", "[2]", etc.).
--zabbix.states STATES
List of one or more monitoring states to ping for:
"start", "finish", and/or "fail". Defaults to pinging
for failure only. Example value: "[start, finish]"
--zabbix.username USERNAME
The username used for authentication. Not needed if
using an API key. Supports the "{credential ...}"
syntax.
--zfs.mount-command MOUNT_COMMAND
Command to use instead of "mount".
--zfs.umount-command UMOUNT_COMMAND
Command to use instead of "umount".
--zfs.zfs-command ZFS_COMMAND
Command to use instead of "zfs".
actions:
Specify zero or more actions. Defaults to create,
prune, compact, and check. Use --help with action for
details:
repo-create (rcreate, init, -I)
Create a new, empty Borg repository
transfer Transfer archives from one repository to another,
optionally upgrading the transferred data [Borg 2.0+
only]
prune (-p) Prune archives according to the retention policy (with
Borg 1.2+, you must run compact afterwards to actually
free space)
compact Compact segments to free space [Borg 1.2+, borgmatic
1.5.23+ only]
create (-C) Create an archive (actually perform a backup)
check (-k) Check archives for consistency
delete Delete an archive from a repository or delete an
entire repository (with Borg 1.2+, you must run
compact afterwards to actually free space)
extract (-x) Extract files from a named archive to the current
directory
config Perform configuration file related operations
export-tar Export an archive to a tar-formatted file or stream
mount (-m) Mount files from a named archive as a FUSE filesystem
umount (-u) Unmount a FUSE filesystem that was mounted with
"borgmatic mount"
repo-delete (rdelete)
Delete an entire repository (with Borg 1.2+, you must
run compact afterwards to actually free space)
restore (-r) Restore data source (e.g. database) dumps from a named
archive
repo-list (rlist) List repository
list (-l) List archive
repo-info (rinfo) Show repository summary information such as disk space
used
info (-i) Show archive summary information such as disk space
used
break-lock Break the repository and cache locks left behind by
Borg aborting
key Perform repository key related operations
recreate Recreate an archive in a repository (with Borg 1.2+,
you must run compact afterwards to actually free
space)
borg Run an arbitrary Borg command
--------------------------------------------------------------------------------
usage: borgmatic repo-create [-e ENCRYPTION_MODE]
[--source-repository KEY_REPOSITORY]
[--repository REPOSITORY] [--copy-crypt-key]
[--append-only] [--storage-quota STORAGE_QUOTA]
[--make-parent-dirs] [-h]
Create a new, empty Borg repository
repo-create arguments:
-e ENCRYPTION_MODE, --encryption ENCRYPTION_MODE
Borg repository encryption mode
--source-repository KEY_REPOSITORY, --other-repo KEY_REPOSITORY
Path to an existing Borg repository whose key material
should be reused [Borg 2.x+ only]
--repository REPOSITORY
Path of the new repository to create (must be already
specified in a borgmatic configuration file), defaults
to the configured repository if there is only one,
quoted globs supported
--copy-crypt-key Copy the crypt key used for authenticated encryption
from the source repository, defaults to a new random
key [Borg 2.x+ only]
--append-only Create an append-only repository
--storage-quota STORAGE_QUOTA
Create a repository with a fixed storage quota
--make-parent-dirs Create any missing parent directories of the
repository directory [Borg 1.x only]
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic transfer [--repository REPOSITORY] --source-repository
SOURCE_REPOSITORY [--archive ARCHIVE]
[--upgrader UPGRADER] [--progress] [-a PATTERN]
[--sort-by KEYS] [--first N] [--last N]
[--oldest TIMESPAN] [--newest TIMESPAN]
[--older TIMESPAN] [--newer TIMESPAN] [-h]
Transfer archives from one repository to another, optionally upgrading the
transferred data [Borg 2.0+ only]
transfer arguments:
--repository REPOSITORY
Path of existing destination repository to transfer
archives to, defaults to the configured repository if
there is only one, quoted globs supported
--source-repository SOURCE_REPOSITORY
Path of existing source repository to transfer
archives from
--archive ARCHIVE Name or hash of a single archive to transfer (or
"latest"), defaults to transferring all archives
--upgrader UPGRADER Upgrader type used to convert the transferred data,
e.g. "From12To20" to upgrade data from Borg 1.2 to 2.0
format, defaults to no conversion
--progress Display progress as each archive is transferred
-a PATTERN, --match-archives PATTERN, --glob-archives PATTERN
Only transfer archives with names, hashes, or series
matching this pattern
--sort-by KEYS Comma-separated list of sorting keys
--first N Only transfer first N archives after other filters are
applied
--last N Only transfer last N archives after other filters are
applied
--oldest TIMESPAN Transfer archives within a specified time range
starting from the timestamp of the oldest archive
(e.g. 7d or 12m) [Borg 2.x+ only]
--newest TIMESPAN Transfer archives within a time range that ends at
timestamp of the newest archive and starts a specified
time range ago (e.g. 7d or 12m) [Borg 2.x+ only]
--older TIMESPAN Transfer archives that are older than the specified
time range (e.g. 7d or 12m) from the current time
[Borg 2.x+ only]
--newer TIMESPAN Transfer archives that are newer than the specified
time range (e.g. 7d or 12m) from the current time
[Borg 2.x+ only]
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic create [--repository REPOSITORY] [--progress] [--stats]
[--list] [--json] [-h]
Create an archive (actually perform a backup)
create arguments:
--repository REPOSITORY
Path of specific existing repository to backup to
(must be already specified in a borgmatic
configuration file), quoted globs supported
--progress Display progress for each file as it is backed up
--stats Display statistics of archive
--list, --files Show per-file details
--json Output results as JSON
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic prune [--repository REPOSITORY] [-a PATTERN] [--stats]
[--list] [--oldest TIMESPAN] [--newest TIMESPAN]
[--older TIMESPAN] [--newer TIMESPAN] [-h]
Prune archives according to the retention policy (with Borg 1.2+, you must run
compact afterwards to actually free space)
prune arguments:
--repository REPOSITORY
Path of specific existing repository to prune (must be
already specified in a borgmatic configuration file),
quoted globs supported
-a PATTERN, --match-archives PATTERN, --glob-archives PATTERN
When pruning, only consider archives with names,
hashes, or series matching this pattern
--stats Display statistics of the pruned archive [Borg 1 only]
--list List archives kept/pruned
--oldest TIMESPAN Prune archives within a specified time range starting
from the timestamp of the oldest archive (e.g. 7d or
12m) [Borg 2.x+ only]
--newest TIMESPAN Prune archives within a time range that ends at
timestamp of the newest archive and starts a specified
time range ago (e.g. 7d or 12m) [Borg 2.x+ only]
--older TIMESPAN Prune archives that are older than the specified time
range (e.g. 7d or 12m) from the current time [Borg
2.x+ only]
--newer TIMESPAN Prune archives that are newer than the specified time
range (e.g. 7d or 12m) from the current time [Borg
2.x+ only]
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic compact [--repository REPOSITORY] [--progress]
[--cleanup-commits] [--threshold COMPACT_THRESHOLD]
[-h]
Compact segments to free space [Borg 1.2+, borgmatic 1.5.23+ only]
compact arguments:
--repository REPOSITORY
Path of specific existing repository to compact (must
be already specified in a borgmatic configuration
file), quoted globs supported
--progress Display progress as each segment is compacted
--cleanup-commits Cleanup commit-only 17-byte segment files left behind
by Borg 1.1 [flag in Borg 1.2 only]
--threshold COMPACT_THRESHOLD
Minimum saved space percentage threshold for
compacting a segment, defaults to 10
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic check [--repository REPOSITORY] [--progress] [--repair]
[--max-duration SECONDS] [-a PATTERN] [--only CHECK]
[--force] [-h]
Check archives for consistency
check arguments:
--repository REPOSITORY
Path of specific existing repository to check (must be
already specified in a borgmatic configuration file),
quoted globs supported
--progress Display progress for each file as it is checked
--repair Attempt to repair any inconsistencies found (for
interactive use)
--max-duration SECONDS
How long to check the repository before interrupting
the check, defaults to no interruption
-a PATTERN, --match-archives PATTERN, --glob-archives PATTERN
Only check archives with names, hashes, or series
matching this pattern
--only CHECK Run a particular consistency check (repository,
archives, data, extract, or spot) instead of
configured checks (subject to configured frequency,
can specify flag multiple times)
--force Ignore configured check frequencies and run checks
unconditionally
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic delete [--repository REPOSITORY] [--archive ARCHIVE] [--list]
[--stats] [--cache-only] [--force]
[--keep-security-info] [--save-space]
[--checkpoint-interval SECONDS] [-a PATTERN]
[--sort-by KEYS] [--first N] [--last N]
[--oldest TIMESPAN] [--newest TIMESPAN]
[--older TIMESPAN] [--newer TIMESPAN] [-h]
Delete an archive from a repository or delete an entire repository (with Borg
1.2+, you must run compact afterwards to actually free space)
delete arguments:
--repository REPOSITORY
Path of repository to delete or delete archives from,
defaults to the configured repository if there is only
one, quoted globs supported
--archive ARCHIVE Archive name, hash, or series to delete
--list Show details for the deleted archives
--stats Display statistics for the deleted archives
--cache-only Delete only the local cache for the given repository
--force Force deletion of corrupted archives, can be given
twice if once does not work
--keep-security-info Do not delete the local security info when deleting a
repository
--save-space Work slower, but using less space [Not supported in
Borg 2.x+]
--checkpoint-interval SECONDS
Write a checkpoint at the given interval, defaults to
1800 seconds (30 minutes)
-a PATTERN, --match-archives PATTERN, --glob-archives PATTERN
Only delete archives with names, hashes, or series
matching this pattern
--sort-by KEYS Comma-separated list of sorting keys
--first N Delete first N archives after other filters are
applied
--last N Delete last N archives after other filters are applied
--oldest TIMESPAN Delete archives within a specified time range starting
from the timestamp of the oldest archive (e.g. 7d or
12m) [Borg 2.x+ only]
--newest TIMESPAN Delete archives within a time range that ends at
timestamp of the newest archive and starts a specified
time range ago (e.g. 7d or 12m) [Borg 2.x+ only]
--older TIMESPAN Delete archives that are older than the specified time
range (e.g. 7d or 12m) from the current time [Borg
2.x+ only]
--newer TIMESPAN Delete archives that are newer than the specified time
range (e.g. 7d or 12m) from the current time [Borg
2.x+ only]
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic extract [--repository REPOSITORY] --archive ARCHIVE
[--path PATH] [--destination PATH]
[--strip-components NUMBER] [--progress] [-h]
Extract a named archive to the current directory
extract arguments:
--repository REPOSITORY
Path of repository to extract, defaults to the
configured repository if there is only one, quoted
globs supported
--archive ARCHIVE Name or hash of a single archive to extract (or
"latest")
--path PATH, --restore-path PATH
Path to extract from archive, can specify flag
multiple times, defaults to the entire archive
--destination PATH Directory to extract files into, defaults to the
current directory
--strip-components NUMBER
Number of leading path components to remove from each
extracted path or "all" to strip all leading path
components. Skip paths with fewer elements
--progress Display progress for each file as it is extracted
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic config [-h] {bootstrap,generate,validate} ...
Perform configuration file related operations
config arguments:
-h, --help Show this help message and exit
config sub-actions:
{bootstrap,generate,validate}
bootstrap Extract the borgmatic configuration files from a named
archive
generate Generate a sample borgmatic configuration file
validate Validate borgmatic configuration files specified with
--config (see borgmatic --help)
--------------------------------------------------------------------------------
usage: borgmatic config bootstrap --repository REPOSITORY
[--local-path LOCAL_PATH]
[--remote-path REMOTE_PATH]
[--user-runtime-directory USER_RUNTIME_DIRECTORY]
[--borgmatic-source-directory BORGMATIC_SOURCE_DIRECTORY]
[--archive ARCHIVE] [--destination PATH]
[--strip-components NUMBER] [--progress]
[--ssh-command COMMAND] [-h]
Extract the borgmatic configuration files from a named archive
config bootstrap arguments:
--repository REPOSITORY
Path of repository to extract config files from,
quoted globs supported
--local-path LOCAL_PATH
Alternate Borg local executable. Defaults to "borg"
--remote-path REMOTE_PATH
Alternate Borg remote executable. Defaults to "borg"
--user-runtime-directory USER_RUNTIME_DIRECTORY
Path used for temporary runtime data like bootstrap
metadata. Defaults to $XDG_RUNTIME_DIR or $TMPDIR or
$TEMP or /var/run/$UID
--borgmatic-source-directory BORGMATIC_SOURCE_DIRECTORY
Deprecated. Path formerly used for temporary runtime
data like bootstrap metadata. Defaults to ~/.borgmatic
--archive ARCHIVE Name or hash of a single archive to extract config
files from, defaults to "latest"
--destination PATH Directory to extract config files into, defaults to /
--strip-components NUMBER
Number of leading path components to remove from each
extracted path or "all" to strip all leading path
components. Skip paths with fewer elements
--progress Display progress for each file as it is extracted
--ssh-command COMMAND
Command to use instead of "ssh"
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic config generate [-s SOURCE_FILENAME]
[-d DESTINATION_FILENAME] [--overwrite] [-h]
Generate a sample borgmatic configuration file
config generate arguments:
-s SOURCE_FILENAME, --source SOURCE_FILENAME
Optional configuration file to merge into the
generated configuration, useful for upgrading your
configuration
-d DESTINATION_FILENAME, --destination DESTINATION_FILENAME
Destination configuration file, default:
/etc/borgmatic/config.yaml
--overwrite Whether to overwrite any existing destination file,
defaults to false
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic config validate [-s] [-h]
Validate borgmatic configuration files specified with --config (see borgmatic
--help)
config validate arguments:
-s, --show Show the validated configuration after all include merging has
occurred
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic export-tar [--repository REPOSITORY] --archive ARCHIVE
[--path PATH] --destination PATH
[--tar-filter TAR_FILTER] [--list]
[--strip-components NUMBER] [-h]
Export an archive to a tar-formatted file or stream
export-tar arguments:
--repository REPOSITORY
Path of repository to export from, defaults to the
configured repository if there is only one, quoted
globs supported
--archive ARCHIVE Name or hash of a single archive to export (or
"latest")
--path PATH Path to export from archive, can specify flag multiple
times, defaults to the entire archive
--destination PATH Path to destination export tar file, or "-" for stdout
(but be careful about dirtying output with --verbosity
or --list)
--tar-filter TAR_FILTER
Name of filter program to pipe data through
--list, --files Show per-file details
--strip-components NUMBER
Number of leading path components to remove from each
exported path. Skip paths with fewer elements
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic mount [--repository REPOSITORY] [--archive ARCHIVE]
--mount-point PATH [--path PATH] [--foreground]
[--first N] [--last N] [--oldest TIMESPAN]
[--newest TIMESPAN] [--older TIMESPAN]
[--newer TIMESPAN] [--options OPTIONS] [-h]
Mount a named archive as a FUSE filesystem
mount arguments:
--repository REPOSITORY
Path of repository to use, defaults to the configured
repository if there is only one, quoted globs
supported
--archive ARCHIVE Name or hash of a single archive to mount (or
"latest")
--mount-point PATH Path where filesystem is to be mounted
--path PATH Path to mount from archive, can specify multiple
times, defaults to the entire archive
--foreground Stay in foreground until ctrl-C is pressed
--first N Mount first N archives after other filters are applied
--last N Mount last N archives after other filters are applied
--oldest TIMESPAN Mount archives within a specified time range starting
from the timestamp of the oldest archive (e.g. 7d or
12m) [Borg 2.x+ only]
--newest TIMESPAN Mount archives within a time range that ends at
timestamp of the newest archive and starts a specified
time range ago (e.g. 7d or 12m) [Borg 2.x+ only]
--older TIMESPAN Mount archives that are older than the specified time
range (e.g. 7d or 12m) from the current time [Borg
2.x+ only]
--newer TIMESPAN Mount archives that are newer than the specified time
range (e.g. 7d or 12m) from the current time [Borg
2.x+ only]
--options OPTIONS Extra Borg mount options
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic umount --mount-point PATH [-h]
Unmount a mounted FUSE filesystem
umount arguments:
--mount-point PATH Path of filesystem to unmount
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic repo-delete [--repository REPOSITORY] [--list] [--force]
[--cache-only] [--keep-security-info] [-h]
Delete an entire repository (with Borg 1.2+, you must run compact afterwards
to actually free space)
delete arguments:
--repository REPOSITORY
Path of repository to delete, defaults to the
configured repository if there is only one, quoted
globs supported
--list Show details for the archives in the given repository
--force Force deletion of corrupted archives, can be given
twice if once does not work
--cache-only Delete only the local cache for the given repository
--keep-security-info Do not delete the local security info when deleting a
repository
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic restore [--repository REPOSITORY] --archive ARCHIVE
[--data-source NAME] [--schema NAME]
[--hostname HOSTNAME] [--port PORT]
[--username USERNAME] [--password PASSWORD]
[--restore-path RESTORE_PATH]
[--original-hostname ORIGINAL_HOSTNAME]
[--original-port ORIGINAL_PORT] [--hook HOOK] [-h]
Restore data source (e.g. database) dumps from a named archive. (To extract
files instead, use "borgmatic extract".)
restore arguments:
--repository REPOSITORY
Path of repository to restore from, defaults to the
configured repository if there is only one, quoted
globs supported
--archive ARCHIVE Name or hash of a single archive to restore from (or
"latest")
--data-source NAME, --database NAME
Name of data source (e.g. database) to restore from
the archive, must be defined in borgmatic's
configuration, can specify the flag multiple times,
defaults to all data sources in the archive
--schema NAME Name of schema to restore from the data source, can
specify flag multiple times, defaults to all schemas.
Schemas are only supported for PostgreSQL and MongoDB
databases
--hostname HOSTNAME Database hostname to restore to. Defaults to the
"restore_hostname" option in borgmatic's configuration
--port PORT Database port to restore to. Defaults to the
"restore_port" option in borgmatic's configuration
--username USERNAME Username with which to connect to the database.
Defaults to the "restore_username" option in
borgmatic's configuration
--password PASSWORD Password with which to connect to the restore
database. Defaults to the "restore_password" option in
borgmatic's configuration
--restore-path RESTORE_PATH
Path to restore SQLite database dumps to. Defaults to
the "restore_path" option in borgmatic's configuration
--original-hostname ORIGINAL_HOSTNAME
The hostname where the dump to restore came from, only
necessary if you need to disambiguate dumps
--original-port ORIGINAL_PORT
The port where the dump to restore came from (if that
port is in borgmatic's configuration), only necessary
if you need to disambiguate dumps
--hook HOOK The name of the data source hook for the dump to
restore, only necessary if you need to disambiguate
dumps
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic repo-list [--repository REPOSITORY] [--short]
[--format FORMAT] [--json] [-P PREFIX] [-a PATTERN]
[--sort-by KEYS] [--first N] [--last N]
[--oldest TIMESPAN] [--newest TIMESPAN]
[--older TIMESPAN] [--newer TIMESPAN] [--deleted]
[-h]
List the archives in a repository
repo-list arguments:
--repository REPOSITORY
Path of repository to list, defaults to the configured
repositories, quoted globs supported
--short Output only archive names
--format FORMAT Format for archive listing
--json Output results as JSON
-P PREFIX, --prefix PREFIX
Deprecated. Only list archive names starting with this
prefix
-a PATTERN, --match-archives PATTERN, --glob-archives PATTERN
Only list archive names, hashes, or series matching
this pattern
--sort-by KEYS Comma-separated list of sorting keys
--first N List first N archives after other filters are applied
--last N List last N archives after other filters are applied
--oldest TIMESPAN List archives within a specified time range starting
from the timestamp of the oldest archive (e.g. 7d or
12m) [Borg 2.x+ only]
--newest TIMESPAN List archives within a time range that ends at
timestamp of the newest archive and starts a specified
time range ago (e.g. 7d or 12m) [Borg 2.x+ only]
--older TIMESPAN List archives that are older than the specified time
range (e.g. 7d or 12m) from the current time [Borg
2.x+ only]
--newer TIMESPAN List archives that are newer than the specified time
range (e.g. 7d or 12m) from the current time [Borg
2.x+ only]
--deleted List only deleted archives that haven't yet been
compacted [Borg 2.x+ only]
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic list [--repository REPOSITORY] [--archive ARCHIVE]
[--path PATH] [--find PATH] [--short] [--format FORMAT]
[--json] [-P PREFIX] [-a PATTERN] [--sort-by KEYS]
[--first N] [--last N] [-e PATTERN]
[--exclude-from FILENAME] [--pattern PATTERN]
[--patterns-from FILENAME] [-h]
List the files in an archive or search for a file across archives
list arguments:
--repository REPOSITORY
Path of repository containing archive to list,
defaults to the configured repositories, quoted globs
supported
--archive ARCHIVE Name or hash of a single archive to list (or "latest")
--path PATH Path or pattern to list from a single selected archive
(via "--archive"), can specify flag multiple times,
defaults to listing the entire archive
--find PATH Partial path or pattern to search for and list across
multiple archives, can specify flag multiple times
--short Output only path names
--format FORMAT Format for file listing
--json Output results as JSON
-P PREFIX, --prefix PREFIX
Deprecated. Only list archive names starting with this
prefix
-a PATTERN, --match-archives PATTERN, --glob-archives PATTERN
Only list archive names matching this pattern
--sort-by KEYS Comma-separated list of sorting keys
--first N List first N archives after other filters are applied
--last N List last N archives after other filters are applied
-e PATTERN, --exclude PATTERN
Exclude paths matching the pattern
--exclude-from FILENAME
Exclude paths from exclude file, one per line
--pattern PATTERN Include or exclude paths matching a pattern
--patterns-from FILENAME
Include or exclude paths matching patterns from
pattern file, one per line
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic repo-info [--repository REPOSITORY] [--json] [-h]
Show repository summary information such as disk space used
repo-info arguments:
--repository REPOSITORY
Path of repository to show info for, defaults to the
configured repository if there is only one, quoted
globs supported
--json Output results as JSON
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic info [--repository REPOSITORY] [--archive ARCHIVE] [--json]
[-P PREFIX] [-a PATTERN] [--sort-by KEYS] [--first N]
[--last N] [--oldest TIMESPAN] [--newest TIMESPAN]
[--older TIMESPAN] [--newer TIMESPAN] [-h]
Show archive summary information such as disk space used
info arguments:
--repository REPOSITORY
Path of repository containing archive to show info
for, defaults to the configured repository if there is
only one, quoted globs supported
--archive ARCHIVE Archive name, hash, or series to show info for (or
"latest")
--json Output results as JSON
-P PREFIX, --prefix PREFIX
Deprecated. Only show info for archive names starting
with this prefix
-a PATTERN, --match-archives PATTERN, --glob-archives PATTERN
Only show info for archive names, hashes, or series
matching this pattern
--sort-by KEYS Comma-separated list of sorting keys
--first N Show info for first N archives after other filters are
applied
--last N Show info for last N archives after other filters are
applied
--oldest TIMESPAN Show info for archives within a specified time range
starting from the timestamp of the oldest archive
(e.g. 7d or 12m) [Borg 2.x+ only]
--newest TIMESPAN Show info for archives within a time range that ends
at timestamp of the newest archive and starts a
specified time range ago (e.g. 7d or 12m) [Borg 2.x+
only]
--older TIMESPAN Show info for archives that are older than the
specified time range (e.g. 7d or 12m) from the current
time [Borg 2.x+ only]
--newer TIMESPAN Show info for archives that are newer than the
specified time range (e.g. 7d or 12m) from the current
time [Borg 2.x+ only]
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic break-lock [--repository REPOSITORY] [-h]
Break Borg repository and cache locks left behind by Borg aborting
break-lock arguments:
--repository REPOSITORY
Path of repository to break the lock for, defaults to
the configured repository if there is only one, quoted
globs supported
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic key export [--paper] [--qr-html] [--repository REPOSITORY]
[--path PATH] [-h]
Export a copy of the repository key for safekeeping in case the original goes
missing or gets damaged
key export arguments:
--paper Export the key in a text format suitable for printing
and later manual entry
--qr-html Export the key in an HTML format suitable for printing
and later manual entry or QR code scanning
--repository REPOSITORY
Path of repository to export the key for, defaults to
the configured repository if there is only one, quoted
globs supported
--path PATH Path to export the key to, defaults to stdout (but be
careful about dirtying the output with --verbosity)
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic key import [--paper] [--repository REPOSITORY] [--path PATH]
[-h]
Import a copy of the repository key from backup
key import arguments:
--paper Import interactively from a backup done with --paper
--repository REPOSITORY
Path of repository to import the key from, defaults to
the configured repository if there is only one, quoted
globs supported
--path PATH Path to import the key from backup, defaults to stdin
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic key change-passphrase [--repository REPOSITORY] [-h]
Change the passphrase protecting the repository key
key change-passphrase arguments:
--repository REPOSITORY
Path of repository to change the passphrase for,
defaults to the configured repository if there is only
one, quoted globs supported
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic recreate [--repository REPOSITORY] [--archive ARCHIVE]
[--list] [--target TARGET] [--comment COMMENT]
[--timestamp TIMESTAMP] [-a PATTERN] [-h]
Recreate an archive in a repository (with Borg 1.2+, you must run compact
afterwards to actually free space)
recreate arguments:
--repository REPOSITORY
Path of repository containing archive to recreate,
defaults to the configured repository if there is only
one, quoted globs supported
--archive ARCHIVE Archive name, hash, or series to recreate
--list Show per-file details
--target TARGET Create a new archive from the specified archive (via
--archive), without replacing it
--comment COMMENT Add a comment text to the archive or, if an archive is
not provided, to all matching archives
--timestamp TIMESTAMP
Manually override the archive creation date/time (UTC)
-a PATTERN, --match-archives PATTERN, --glob-archives PATTERN
Only consider archive names, hashes, or series
matching this pattern [Borg 2.x+ only]
-h, --help Show this help message and exit
--------------------------------------------------------------------------------
usage: borgmatic borg [--repository REPOSITORY] [--archive ARCHIVE]
[-- OPTION [OPTION ...]] [-h]
Run an arbitrary Borg command based on borgmatic's configuration
borg arguments:
--repository REPOSITORY
Path of repository to pass to Borg, defaults to the
configured repositories, quoted globs supported
--archive ARCHIVE Archive name, hash, or series to pass to Borg (or
"latest")
-- OPTION [OPTION ...]
Options to pass to Borg, command first ("create",
"list", etc). "--" is optional. To specify the
repository or the archive, you must use --repository
or --archive instead of providing them here.
-h, --help Show this help message and exit
Improve this documentation
Have an idea on how to make this documentation even better? Use our issue tracker to send your feedback!