forked from bebehei/backup-with-borg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.env
81 lines (66 loc) · 2.96 KB
/
example.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Set path to borg command. Default is "/usr/local/bin/borg".
export CMD_BORG=/usr/local/bin/borg
# Use an external command to obtain the passphrase
#export BORG_PASSCOMMAND='cat /etc/backup/passphrase'
# set borg's passphrase for encryption support, but you should use PASSCOMMAND instead
#export BORG_PASSPHRASE=''
# set location of borg's keyfile for a single repository.
# More secure than using a repokey. For multiple repos, use BORG_KEYS_DIR.
#export BORG_KEY_FILE='/home/user/.config/borg/keys/mykey.key'
#export BORG_KEYS_DIR='/home/user/.config/borg/keys'
# set the location of an SSH key for a remote borg server
#export BORG_RSH='ssh -i /home/user/.ssh/id_ed25519'
# set the repository path for borg
# examples:
# export BORG_REPO='/path/to/repo' # local directory location
# export BORG_REPO='user@host:/path/to/repo' # remote borg server location
#export BORG_REPO=""
# Set a sane cache TTL. The default is 20.
# Increase this value if you have more than 20 archives to avoid chunking performance penalty.
# In this example, we programmatically set the TTL by multiplying a count of user home
# directory contents then multiplying by 4.
export BORG_FILES_CACHE_TTL=$(expr `ls /home/* | wc -l` \* 4)
# If you're running a system-wide backup,
# it may make sense to use system-wide paths
#export BORG_KEYS_DIR=/etc/backup/default/keys
#export BORG_SECURITY_DIR=/etc/backup/default/security
#export BORG_CACHE_DIR=/var/cache/backup/default
# If you want to add additional options to borg's command line, add them here.
# Make sure to add a trailing space before the end quote.
#OPT_BORG=" "
#OPT_BORG_CREATE=" "
#OPT_BORG_PRUNE=" "
OPT_BORG_COMPACT="--cleanup-commits --threshold 10 "
# if you want to have verbose output during manual run
# but not on cron-calls, uncomment this.
#if tty &>/dev/null; then
# OPT_BORG_CREATE+="--verbose --progress --stats"
# OPT_BORG_PRUNE+="--verbose --list --progress --stats"
# OPT_BORG_COMPACT+="--verbose --progress"
#fi
# These paths should get saved in the archive.
SOURCES=(/)
# Exclude directories that contain a CACHEDIR.TAG file (see https://www.bford.info/cachedir/)
#OPT_BORG_EXCLUDE_CACHES="--exclude-caches"
# Exclude directories that are tagged by containing a filesystem object with the given NAME. For this example, it is a file called '.nobackup'.
#OPT_BORG_EXCLUDE_IF_PRESENT="--exclude-if-present .nobackup"
# The archives have the naming scheme of
# <hostname><suffix>-<date>
# so setting <suffix> to something meaningful
# prepended with a - is a good choice
#SUFFIX="-full"
# Keep the amount of archives in the given
# interval with borg's pruning option
# The KEEP_<interval> vars correspond to
# borg prune --keep-<interval>=. See borg prune --help
# for more information
KEEP_WITHIN=10H
KEEP_HOURLY=15
KEEP_DAILY=7
KEEP_WEEKLY=4
KEEP_MONTHLY=12
KEEP_YEARLY=99
# Keep the minimal amount of archives unconditionally,
# ignoring all other KEEP_ options.
# Set this at least to 1, if you execute prune before create
KEEP_LAST=1