-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathborg_backup_config.sample
More file actions
50 lines (38 loc) · 1.49 KB
/
borg_backup_config.sample
File metadata and controls
50 lines (38 loc) · 1.49 KB
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
# Backup dir
mainDir=/mnt/borg_backups
# OPTIONAL: Mountpoints to mount before backup. Will be umounted after backup is done
#backupMounts=(
#11111111-2222-3333-4444-555555555555,/mnt/backupfs,ext4,noatime
#66666666-7777-8888-9999-000000000000,/mnt/backupfs/boot,ext4,noatime
#AAAA-BBBB,/mnt/backupfs/boot/efi,vfat
#)
# OPTIONAL: Borg password file
#borgPass=$(cat /root/.borg.pass)
# Borg compression, see: borg help compression
#borgCompression=auto,lz4
# Borg archive retention, see: borg help prune
#borgKeepDaily=7
#borgKeepWeekly=4
#borgKeepMontly=6
#borgKeepYearly=5
# Borg repo names, bash array
repos=('repo1' 'repo2')
# Paths to backup for each repo. Append 'repo_' to the repo name specified above, and add the paths to the bash array
repo_repo1=('/opt/scripts' '/var/log/scripts')
repo_repo2=('/home/user')
# OPTIONAL: Directories to check for ransomware before backup, see README for shrans.sh
#ransChecks=('/opt/scripts' '/home/user')
# Commands to execute before the backup process starts. Useful to include files that are output of external commands, like database dumps
preCommands () {
#mkdir /tmp/backup
#cd /tmp/backup
#dpkg --get-selections > dpkg-selections.txt
#dpkg-query -W --showformat=\${status}$'\t'\${package}$'\t'\${version}$'\t'\${installed-size}$'\n' | column -t > dpkg-versions.txt
true
}
# Commands to execute after the backup process ends. Useful to changing borg repo ownership and misc cleanup
postCommands () {
#rm -rf /tmp/backup
#chmod -R u=rwX,g=rX,o= "$mainDir"
true
}