Adds possibility to have multiple profiles with different backup paths, retention etc. Co-authored-by: Matt Feifarek <matt.feifarek@gmail.com> Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
# This is the default profile. Fill it with your desired configuration.
|
|
# Additionally, you can create and use more profiles by copying this file.
|
|
|
|
# This file (and other .env files) has two purposes:
|
|
# - being sourced by systemd timers to setup the backup before running restic_backup.sh
|
|
# - being sourced in a user's shell to work directly with restic commands e.g.
|
|
# $ source /etc/restic/default.env
|
|
# $ restic snapshots
|
|
# Thus you don't have to provide all the arguments like
|
|
# $ restic --repo ... --password-file ...
|
|
|
|
source /etc/restic/_global.env
|
|
|
|
# Below envvar will override those in _global.env
|
|
|
|
export RESTIC_REPOSITORY="b2:<b2-repo-name>" # TODO fill with your repo name
|
|
|
|
# What to backup (paths our mountpoints) e.g. "/ /boot /home /mnt/media".
|
|
# To backup only your home directory, set "/home/your-user"
|
|
export BACKUP_PATHS="" # TODO fill conveniently with one or multiple paths
|
|
|
|
# Example below of how to dynamically add a path that is mounted e.g. external USB disk.
|
|
# restic does not fail if a specified path is not mounted, but it's nicer to only add if they are available.
|
|
#test -d /mnt/media && BACKUP_PATHS+=" /mnt/media"
|
|
|
|
# A tag to identify backup snapshots.
|
|
export BACKUP_TAG=systemd.timer
|
|
|
|
# Retention policy - How many backups to keep.
|
|
# See https://restic.readthedocs.io/en/stable/060_forget.html?highlight=month#removing-snapshots-according-to-a-policy
|
|
export RETENTION_DAYS=14
|
|
export RETENTION_WEEKS=16
|
|
export RETENTION_MONTHS=18
|
|
export RETENTION_YEARS=3
|