# These settings are common to all configurations  -*- mode: python-ts; -*-

# configurations
configurations = "home-local home-blackstaff home-ndbackups home=home-local,home-blackstaff,home-ndbackups"
default_configuration = "home"

# encryption
encryption = "repokey"  # borg encryption method
# Common choices are 'repokey' and 'keyfile'.
# With 'repokey' the encryption key is copied into repository, use this
# only if the remote repository is owned by you and is secure.
# With 'keyfile' the encryption key is only stored locally. Be sure to
# export it and save a copy in a safe place, otherwise you may not be
# able to access your backups if you lose your disk.
# specify either passphrase or avendesora_account
passcommand = "gopass show -o borg/jleechpe"

# basic settings
# specify notify if batch and notifier if interactive
notify = "jonathan@leechpepin.com"  # who to notify when things go wrong
notifier = 'notify-send -u normal {prog_name} "{msg}"'
# interactive notifier program
prune_after_create = True  # automatically run prune after a backup
check_after_create = "latest"  # automatically run check after a backup
compact_after_delete = True  # automatically run compact after a delete or prune

# repository settings
archive = "{host_name}-{{now}}"
glob_archives = "{host_name}-*"
# These may contain {<name>} where <name> is any of host_name, user_name,
# prog_name config_name, or any of the user specified settings.
# Double up the braces to specify parameters that should be interpreted
# directly by borg, such as {{now}}.
compression = "zstd,3"

# filter settings
exclude_if_present = ".stfolder"
exclude_caches = True

# prune settings
keep_within = "3H"  # keep all archives created in interval
# keep_hourly = 48  # number of hourly archives to keep
keep_daily = 7  # number of daily archives to keep
keep_weekly = 4  # number of weekly archives to keep
keep_monthly = 6  # number of monthly archives to keep
keep_yearly = 1  # number of yearly archives to keep

# run_after_backup = ["borg-space -r {config_name}"]
# run_after_borg = [
#    "ntlog --keep-for 7 --day 'D MMMM YYYY  {{{{{{1' --entry 'h:mm A  {{{{{{2' --description 'Backup' --fold-marker '{{{{{{ ❬❬❬' /home/{user_name}/.local/share/emborg/{config_name}.log",
# ]
