-
Notifications
You must be signed in to change notification settings - Fork 0
/
backups.sample.conf
executable file
·77 lines (61 loc) · 2.66 KB
/
backups.sample.conf
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
#!/usr/bin/bash
# Configuration file for rsync-backup backups
set -e # Exit if anything returns a bad return value.
set -u # Exit if we attempt to use an uninitialized variable
# ----------------------------------------------------------
# Basic directory and folder options
# ----------------------------------------------------------
# Duplicity location and options.
DUPLICITY='/usr/bin/duplicity'
# Arhive directory used for duplicity. See man duplicity for details.
# The archive directory should not be deleted, and should be writable.
ARCHIVE_DIR="/archive"
# ----------------------------------------------------------
# Logging preferences
# ----------------------------------------------------------
# Note: LOG_BASENAME is set in the invoking script to indicate which script is logged.
LOG_TIME=`date +%F_%H%M`
LOG_DIR="/var/log/backup" # Needed for rsync-archive-logs
LOG_NAME="${LOG_DIR}/${LOG_BASENAME}_${LOG_TIME}.log"
TEE='/usr/bin/tee -a'
# ----------------------------------------------------------
# Backup configuration
# ----------------------------------------------------------
# Source and destination points
DESTINATION_PATH="scp://user@file-server/backup-folder"
# Space-separated list of fully-qualified directory paths to back up.
# These mount points should be writable folders on the remote backup host defined above.
BACKUP_DIRS='/home/user /path/to/dir1 /path/to/dir2'
# ----------------------------------------------------------
# Backup encryption configuration
# ----------------------------------------------------------
# GPG key and pw to use for encryption. See gpg --list-keys and copy your key fingerprint.
# For example, KEY_ID would be "BEEFB33F" here:
# pub 4096R/BEEFB33F 2013-10-26
#
KEY_ID="FILL_IN_KEY"
# Put passphrase for the secret key here. Leave blank if no passphrase was
# defined when you created the key pair.
export PASSPHRASE=""
# ---------------------------------------------------------------------------
# USER SERVICEABLE PARTS END HERE (Recommend against tweaking settings below)
# ---------------------------------------------------------------------------
# ----------------------------------------------------------
# rsync-archive-logs variables.
# ----------------------------------------------------------
TAR_CMD='/bin/tar -cvzf'
RM_CMD='/bin/rm'
FILES_TO_ARCHIVE='*.log'
ARCHIVE_DATE=`date +%F_%H%M`
ARCHIVE_NAME="log-archive-$ARCHIVE_DATE.tar.gz"
# This should be 'full' or 'incremental'. If omitted, duplicity will
# do a full if the directory has never been backed up at the destination;
# otherwise it will perform an incremental.
set +u
if [ -z $1 ]
then
BACKUP_TYPE="full"
else
BACKUP_TYPE=$1
fi
set -u