borgmatic: fix config

This commit is contained in:
vincent 2024-03-02 10:34:44 +01:00
parent 012c448c73
commit b7dc26cc27

View File

@ -52,150 +52,143 @@ BORG_PASSPHRASE= {{.Data.data.passphrase}}
} }
template { template {
data= <<EOH data= <<EOH
location: # List of source directories to backup (required). Globs and
# List of source directories to backup (required). Globs and # tildes are expanded. Do not backslash spaces in path names.
# tildes are expanded. Do not backslash spaces in path names. source_directories:
source_directories: - /exports/ebook
- /exports/ebook - /exports/homes
- /exports/homes - /exports/music
- /exports/music - /exports/nomad
- /exports/nomad - /exports/photo
- /exports/photo
repositories: repositories:
- u304977@u304977.your-storagebox.de:{{if eq "production" (env "meta.env") }}backup_hamelab{{else}}backup_homelab_dev{{end}} - path: ssh://u304977@u304977.your-storagebox.de/./{{if eq "production" (env "meta.env") }}backup_hamelab{{else}}backup_homelab_dev{{end}}
label: {{if eq "production" (env "meta.env") }}backup_hamelab{{else}}backup_homelab_dev{{end}}
exclude_patterns: exclude_patterns:
- '*/nomad/jellyfin/cache' - '*/nomad/jellyfin/cache'
- '*/loki/chunks' - '*/loki/chunks'
# - /home/*/.cache match_archives: '*'
# - '*/.vim*.tmp' archive_name_format: '{{ env "node.datacenter" }}-{now:%Y-%m-%dT%H:%M:%S.%f}'
# - /etc/ssl extra_borg_options:
# - /home/user/path with spaces # Extra command-line options to pass to "borg init".
# init: --extra-option
storage: # Extra command-line options to pass to "borg prune".
extra_borg_options: # prune: --extra-option
# Extra command-line options to pass to "borg init".
# init: --extra-option
# Extra command-line options to pass to "borg prune". # Extra command-line options to pass to "borg compact".
# prune: --extra-option # compact: --extra-option
# Extra command-line options to pass to "borg compact". # Extra command-line options to pass to "borg create".
# compact: --extra-option create: --progress --stats
# Extra command-line options to pass to "borg create". # Extra command-line options to pass to "borg check".
create: --progress --stats # check: --extra-option
# Extra command-line options to pass to "borg check". # Keep all archives within this time interval.
# check: --extra-option # keep_within: 3H
retention: # Number of secondly archives to keep.
# Keep all archives within this time interval. # keep_secondly: 60
# keep_within: 3H
# Number of secondly archives to keep. # Number of minutely archives to keep.
# keep_secondly: 60 # keep_minutely: 60
# Number of minutely archives to keep. # Number of hourly archives to keep.
# keep_minutely: 60 # keep_hourly: 24
# Number of hourly archives to keep. # Number of daily archives to keep.
# keep_hourly: 24 keep_daily: 7
# Number of daily archives to keep. # Number of weekly archives to keep.
keep_daily: 7 keep_weekly: 4
# Number of weekly archives to keep. # Number of monthly archives to keep.
keep_weekly: 4 # keep_monthly: 6
# Number of monthly archives to keep. # Number of yearly archives to keep.
# keep_monthly: 6 # keep_yearly: 1
# Number of yearly archives to keep. checks:
# keep_yearly: 1 - name: repository
# - archives
consistency: # check_repositories:
checks: # - user@backupserver:sourcehostname.borg
- repository # check_last: 3
# - archives
# check_repositories:
# - user@backupserver:sourcehostname.borg
# check_last: 3
# output: # output:
# color: false # color: false
# hooks: # List of one or more shell commands or scripts to execute
# List of one or more shell commands or scripts to execute # before creating a backup, run once per configuration file.
# before creating a backup, run once per configuration file. # before_backup:
# before_backup: # - echo "Starting a backup."
# - echo "Starting a backup."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# before pruning, run once per configuration file. # before pruning, run once per configuration file.
# before_prune: # before_prune:
# - echo "Starting pruning." # - echo "Starting pruning."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# before compaction, run once per configuration file. # before compaction, run once per configuration file.
# before_compact: # before_compact:
# - echo "Starting compaction." # - echo "Starting compaction."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# before consistency checks, run once per configuration file. # before consistency checks, run once per configuration file.
# before_check: # before_check:
# - echo "Starting checks." # - echo "Starting checks."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# before extracting a backup, run once per configuration file. # before extracting a backup, run once per configuration file.
# before_extract: # before_extract:
# - echo "Starting extracting." # - echo "Starting extracting."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# after creating a backup, run once per configuration file. # after creating a backup, run once per configuration file.
# after_backup: # after_backup:
# - echo "Finished a backup." # - echo "Finished a backup."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# after compaction, run once per configuration file. # after compaction, run once per configuration file.
# after_compact: # after_compact:
# - echo "Finished compaction." # - echo "Finished compaction."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# after pruning, run once per configuration file. # after pruning, run once per configuration file.
# after_prune: # after_prune:
# - echo "Finished pruning." # - echo "Finished pruning."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# after consistency checks, run once per configuration file. # after consistency checks, run once per configuration file.
# after_check: # after_check:
# - echo "Finished checks." # - echo "Finished checks."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# after extracting a backup, run once per configuration file. # after extracting a backup, run once per configuration file.
# after_extract: # after_extract:
# - echo "Finished extracting." # - echo "Finished extracting."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# when an exception occurs during a "prune", "compact", # when an exception occurs during a "prune", "compact",
# "create", or "check" action or an associated before/after # "create", or "check" action or an associated before/after
# hook. # hook.
# on_error: # on_error:
# - echo "Error during prune/compact/create/check." # - echo "Error during prune/compact/create/check."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# before running all actions (if one of them is "create"). # before running all actions (if one of them is "create").
# These are collected from all configuration files and then # These are collected from all configuration files and then
# run once before all of them (prior to all actions). # run once before all of them (prior to all actions).
# before_everything: # before_everything:
# - echo "Starting actions." # - echo "Starting actions."
# List of one or more shell commands or scripts to execute # List of one or more shell commands or scripts to execute
# after running all actions (if one of them is "create"). # after running all actions (if one of them is "create").
# These are collected from all configuration files and then # These are collected from all configuration files and then
# run once after all of them (after any action). # run once after all of them (after any action).
# after_everything: # after_everything:
# - echo "Completed actions." # - echo "Completed actions."
EOH EOH
destination = "local/borgmatic.d/config.yaml" destination = "local/borgmatic.d/config.yaml"
} }