-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sh.def
33 lines (28 loc) · 978 Bytes
/
config.sh.def
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
#!/bin/bash
# Copyright (C) 2018 by Tomas Herceg <[email protected]>
# Released under GNU GPL 3 or later
# space delimited list of hostnames to backup
HOSTS=(localhost)
# name of the zpool
POOL=zpool
# dir where is zpool mounted
MOUNT_DIR=/mnt/$POOL
# we need this hack to properly handle spaces and symlinks.
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
# global exlude file
EXCLUDE_PATH=$SCRIPTPATH/backup_exclude
# dir for excluding files per hostname - filename is hostname of the backuped server
EXCLUDE_DIR=$SCRIPTPATH/backup_exclude.d
# lock dir to avoid running backups from same machine multiple times
LOCK_DIR=/run/lock/backup
# how many times try to run rsync before backup fails
: ${MAX_RETRIES:=3}
# this will keep only one backup per day (the latest)
: ${KEEP_DAYS:=60}
# this will keep all backups (if you backuping more then once a day)
: ${KEEP_ALL_DAYS:=1}
# limit rsync bandwidth per sec
: ${BW_LIMIT:=35M}
# debug settings
: ${DEBUG:=1}
: ${DEBUG_RSYNC:=1}