forked from Pricetx/backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackup.cfg
76 lines (55 loc) · 2.37 KB
/
backup.cfg
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
### BACKUP CONFIGURATION ###
## GENERATING PRIVATE AND PUBLIC KEYS ##
# To generate the private key:
# 'openssl genrsa -out [nameofkey].key -aes256 4096'
#
# To generate the X509 certificate:
# 'openssl req -out [nameofkey].crt -new -key [nameofkey].key -x509'
#
# To decrypt backups:
# 'openssl smime -decrypt -in [nameofbackup].tgz.enc -inform DER -inkey [nameofkey].key -out [nameofbackup].tgz'
#
# KEEP THE PRIVATE KEY SAFE. It does not need to be kept on the server. If you lose it, you will NOT be able to unencrypt backups
# ALSO, make sure you keep the passphrase for the private key safe, if you forget the password, the backups can not be decrypted
## Edit the entries below to match your needs ##
# Directory to store backups
LOCALDIR="/root/backups/"
# Temporary directory used during backup creation
TEMPDIR="/root/backups/temp/"
# File to log the outcome of backups
LOGFILE="/root/backups/backup.log"
# The X509 certificate to encrypt the backup
CRTFILE="/root/NAME_OF_CERT.crt"
# Number of days to store daily local backups
LOCALAGEDAILIES="7"
# Number of days to store daily remote backups
REMOTEAGEDAILIES="7"
# Number of days to store weekly local backups
LOCALAGEWEEKLIES="28"
# Number of days to store weekly remote backups
REMOTEAGEWEEKLIES="28"
# Number of days to store monthly local backups
LOCALAGEMONTHLIES="183"
# Number of days to store monthly remote backups
REMOTEAGEMONTHLIES="183"
# IP / hostname of the server to store remote backups
REMOTESERVER="REMOTE_SERVER_HERE"
# SSH port of remote server
REMOTEPORT=22
# User to use with SSH (public key needs to be installed on the remote server)
REMOTEUSER="REMOTE_USER_HERE"
# Path to store the remote backups
REMOTEDIR="/BACKUP/PATH/ON/REMOTE/SYSTEM/"
# OPTIONAL: If you want MySQL to be backed up, enter the root password below
ROOTMYSQL=""
# Below is a list of files and directories that will be backed up in the tar
# backup. To add an entry, add a new line and increment the number in brackets
BACKUP[0]="/root/backup.sh"
BACKUP[1]="/etc/"
# Files and directories to exclude from tar backups
# To add an entry, add a new line and increment the number in brackets
EXCLUDE[0]=""
# Below is a list of files and directories that will be backed up in the rsync
# backup. To add an entry, add a new line and increment the number in brackets
# NOTE: DO NOT LEAVE A TRAILING SLASH - IT WILL CAUSE IT TO NOT WORK
RSYNCDIR[0]=""