-
Notifications
You must be signed in to change notification settings - Fork 2
/
matiri_options
32 lines (22 loc) · 1.1 KB
/
matiri_options
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
# Options that affect matiri's functionality
# Enable or diable logging - set to 0 to disable logging
readonly LOG=true
# Dependencies to check for before proceeding
readonly DEPENDENCIES=(tar xargs nproc date readlink sha1sum gzip)
# Root location of where backups stored
readonly BASE_DESTINATION_DIR="/tmp/db_backups"
# This depends more on the server machine: too high and mysqld load goes very high on server;
readonly CONCURRENCY_LEVEL=$(echo `nproc=$(expr $(nproc) + 1); echo $(expr $nproc / 2)`)
# Prefix to append before all backup file names
readonly DESTINATION_TMP_PREFIX='mysql_backup'
# Directory structure of backups e.g. DESTINATION/YYYY/MM
readonly DESTINATION_DIR=${BASE_DESTINATION_DIR}/$(date +%Y)/$(date +%m)
# SQLite DB backup that captures backup events
readonly DB_FILE="$BASE_DESTINATION_DIR/backups.sqlite3.db"
readonly DB_FILE_COPY="$DESTINATION_DIR/backups_copy.sqlite3.db"
readonly MYSQL_BIN='/usr/bin/mysql'
readonly LIST_DATABASES='list_mysql_databases_by_size.sql'
timeStamp=$(date "+%F %H:%M:%S%t%s")
readonly DB_FOLDER_MODE=750
readonly DB_FILE_MODE=640
readonly INTER_DUMP_DELAY=5