# List of source directories and files to back up. Globs and tildes # are expanded. Do not backslash spaces in path names. source_directories: - / # 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. Prior to borgmatic 1.7.10, repositories was a # list of plain path strings. repositories: - path: ssh://xyz@xyz.repo.borgbase.com/./repo label: complete_system-borgbase # Stay in same file system; do not cross mount points beyond the given # source directories. Defaults to false. But when a database hook is # used, the setting here is ignored and one_file_system is considered # true. one_file_system: false # Read exclude patterns from one or more separate named files, one # pattern per line. See the output of "borg help patterns" for more # details. exclude_from: - /etc/borgmatic/excludes # Exclude directories that contain a CACHEDIR.TAG file. See # http://www.brynosaurus.com/cachedir/spec.html for details. Defaults # to false. exclude_caches: true # Exclude directories that contain a file with the given filenames. # Defaults to not set. exclude_if_present: - .git # 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. keep_exclude_tags: true # Exclude files with the NODUMP flag. Defaults to false. exclude_nodump: true # Path for additional source files used for temporary internal state # like borgmatic database dumps. Note that changing this path prevents # "borgmatic restore" from finding any database dumps created before # the change. Defaults to ~/.borgmatic borgmatic_source_directory: /var/cache/borgmatic # If true, then source directories must exist, otherwise an error is # raised. Defaults to false. source_directories_must_exist: true # 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. Defaults to not set. encryption_passcommand: cat /dev/null # Type of compression to use when creating archives. See # http://borgbackup.readthedocs.io/en/stable/usage/create.html for # details. Defaults to "lz4". compression: auto,zstd,22 # Total retry time can be calculated with the following Python code: # # ``` # retries = 25 # retry_wait = 1 # total_retry_time = 0 # # for retry_num in range(1, retries + 1): # total_retry_time += retry_num * retry_wait # # print(total_retry_time) # # ``` # Number of times to retry a failing backup before giving up. Defaults # to 0 (i.e., does not attempt retry). retries: 25 # Wait time between retries (in seconds) to allow transient issues to # pass. Increases after each retry as a form of backoff. Defaults to 0 # (no wait). retry_wait: 1 # Command to use instead of "ssh". This can be used to specify ssh # options. Defaults to not set. ssh_command: ssh -i /etc/borgmatic/id_ed25519-complete_system-borgbase # Base path used for various Borg directories. Defaults to $HOME, # ~$USER, or ~. borg_base_directory: / # Path for Borg configuration files. Defaults to # $borg_base_directory/.config/borg borg_config_directory: /etc/borgmatic # Path for Borg cache files. Defaults to # $borg_base_directory/.cache/borg borg_cache_directory: /var/cache/borg # Path for Borg security and encryption nonce files. Defaults to # $borg_base_directory/.config/borg/security borg_security_directory: /var/lib/borg/security # Path for Borg encryption key files. Defaults to # $borg_base_directory/.config/borg/keys borg_keys_directory: /etc/borgmatic/keys # Umask used for when executing Borg or calling hooks. Defaults to # 0077 for Borg or the umask that borgmatic is run with for hooks. umask: 0077 # Name of the archive. 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}". When running actions like # rlist, info, or check, borgmatic automatically tries to match only # archives created with this name format. archive_name_format: "{utcnow:%Y-%m-%d-%H-%M}_complete_system" # 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). checks: # Name of consistency check to run: "repository", # "archives", "data", and/or "extract". Set to "disabled" # to disable all consistency checks. "repository" checks # the consistency of the repository, "archives" checks all # of the archives, "data" verifies the integrity of the # data within the archives, and "extract" does an # extraction dry-run of the most recent archive. Note that # "data" implies "archives". # 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. - name: repository frequency: 1 week - name: archives frequency: 1 week - name: data frequency: 1 week # Restrict the number of checked archives to the last n. Applies only # to the "archives" check. Defaults to checking all archives. check_last: 1