forked from ramirojoaquin/vestacp-borg-incremental-backups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ini
49 lines (39 loc) · 2.09 KB
/
config.ini
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
# This config file set the global variables for all backup and restore scripts.
##### What to backup #####
HOME_DIR=/home # Where user directories are placed
SCRIPTS_DIR=/root/scripts # Where custom scripts are stored
ETC_DIR=/etc # Server level config files
VESTA_DIR=/usr/local/vesta # Where Vesta CP files are stored
##### What NOT to backup #####
# This scrupt treats all dirs under /home as "users"
# Put here the users or dirs under /home that you dont want to backup, separated by , Ex: "user,user2,otheruser"
EXCLUDED_USERS=
##### Where to backup #####
BACKUP_DIR=/backup # Global backup directory, inside this dir the script creates the different repo dirs.
ARCHIVE_DIR=$BACKUP_DIR/offline # Is where offline users / archived users are stored. Incremental backups will not execute in archived users.
# This is where individual users repositories will be created
REPO_USERS_DIR=$BACKUP_DIR/borg/home
# Sever level repositories
REPO_SCRIPTS=$BACKUP_DIR/borg/scripts
REPO_ETC=$BACKUP_DIR/borg/etc
REPO_VESTA=$BACKUP_DIR/borg/vesta
##### How many backups to keep (-1 for infinite) #####
BACKUP_DAYS=90
BACKUP_WEEKS=24
BACKUP_MONTHS=-1
##### Dir names #####
PUBLIC_HTML_DIR_NAME=public_html
DB_DUMP_DIR_NAME=db_dump
##### BORG config #####
OPTIONS_INIT="--encryption=none"
OPTIONS_CREATE="-sv --compression lz4"
OPTIONS_PRUNE="-v --keep-daily=$BACKUP_DAYS --keep-weekly=$BACKUP_WEEKS --keep-monthly=$BACKUP_MONTHS"
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes # Leave yes if when you run the script via cron to avoid missing borg cache files.
export HOME=/root # Sometimes when you run via cron, you need to export home directory, so borg can find cache files
# Its very useful to have a backup mirror in other location, just in case the main server goes down
##### Backup dir sync to remote server. Leave blank to skip #####
# !!!!!!!!! WARNING, THE DESTINATION DIR IN THE REMOTE SERVER WILL BE COMPLETELY OVERWRITTEN !!!!!!!!!!
# !!!!!!!!! Setup a passwordless ssh connection to remote server before using this feature
REMOTE_BACKUP_SERVER=
REMOTE_BACKUP_SERVER_USER=root
REMOTE_BACKUP_SERVER_DIR=/backup/mainserver