Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9fbbcc6de | ||
|
|
64e876a9a4 | ||
|
|
694e54ca9c | ||
|
|
09bd6015ac | ||
|
|
5b8b0afec2 |
33
Readme.md
33
Readme.md
@@ -220,10 +220,10 @@ The postgres user must be added to the backup group for this, so that the basic
|
||||
|
||||
### PostgreSQL Config variables
|
||||
|
||||
Variable | Default | Description
|
||||
| Variable | Default | Description |
|
||||
| - | - | - |
|
||||
DATABASE_FULL_DUMP | | if empty, dump per databse, if set dump all in one file, if set to schema dump only schema
|
||||
DATABASE_USER | | overide username to connect to database
|
||||
| DATABASE_FULL_DUMP | | if empty, dump per databse, if set dump all in one file, if set to schema dump only schema |
|
||||
| DATABASE_USER | | overide username to connect to database |
|
||||
|
||||
### PostgreSQL Control files
|
||||
|
||||
@@ -239,10 +239,10 @@ If non root ident authentication run is used, be sure that the `mysql` user is i
|
||||
|
||||
### MySQL Config variables
|
||||
|
||||
Variable | Default | Description
|
||||
| Variable | Default | Description |
|
||||
| - | - | - |
|
||||
DATABASE_FULL_DUMP | | if empty, dump per databse, if set dump all in one file, if set to schema dump only schema
|
||||
MYSQL_DB_CONFIG | | override file for connection. In modern mariaDB installations it is rcommended to run the script as root or mysql user and use the ident authentication instead.
|
||||
| DATABASE_FULL_DUMP | | if empty, dump per databse, if set dump all in one file, if set to schema dump only schema |
|
||||
| MYSQL_DB_CONFIG | | override file for connection. In modern mariaDB installations it is rcommended to run the script as root or mysql user and use the ident authentication instead. |
|
||||
|
||||
### MySQLControl files
|
||||
|
||||
@@ -259,12 +259,13 @@ This user is neede to create the temporary dump folder and access for the git fi
|
||||
|
||||
### gitea Config Variables
|
||||
|
||||
Variable | Default | Description
|
||||
| Variable | Default | Description |
|
||||
| - | - | - |
|
||||
GIT_USER | git | The user that runs gitea |
|
||||
GITEA_TMP | /tmp/gitea/ | Where the temporary dump files from the backup are stored, as user git |
|
||||
GITEA_BIN | /usr/local/bin/gitea | Where the gitea binary is located |
|
||||
GITEA_CONFIG | /etc/gitea/app.ini | The configuration file for gitea |
|
||||
| GIT_USER | git | The user that runs gitea |
|
||||
| GITEA_WORKING_DIR | /var/tmp/gitea/ | Where the temporary dump files from the backup are stored, as user git |
|
||||
| GITEA_TEMP_DIR | /var/tmp/ | General temporary folder |
|
||||
| GITEA_BIN | /usr/local/bin/gitea | Where the gitea binary is located |
|
||||
| GITEA_CONFIG | /etc/gitea/app.ini | The configuration file for gitea |
|
||||
|
||||
### gitea Control files
|
||||
|
||||
@@ -274,12 +275,12 @@ There are no control files for gitea backup
|
||||
|
||||
### zabbix Config Variables
|
||||
|
||||
Variable | Default | Description
|
||||
| Variable | Default | Description |
|
||||
| - | - | - |
|
||||
ZABBIX_DUMP | /usr/local/bin/zabbix-dump |
|
||||
ZABBIX_DATABASE | '' | Must be set as either psql or mysql
|
||||
ZABBIX_CONFIG | '' | if not set uses default location
|
||||
ZABBIX_UNKNOWN_TABLES | '' | if set, changed to -f (force)
|
||||
| ZABBIX_DUMP | /usr/local/bin/zabbix-dump | |
|
||||
| ZABBIX_DATABASE | '' | Must be set as either psql or mysql |
|
||||
| ZABBIX_CONFIG | '' | if not set uses default location |
|
||||
| ZABBIX_UNKNOWN_TABLES | '' | if set, changed to -f (force) |
|
||||
|
||||
### zabbix Control files
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ function version {
|
||||
}
|
||||
|
||||
# version for all general files
|
||||
VERSION="4.4.0";
|
||||
VERSION="4.5.4";
|
||||
|
||||
# borg version and borg comamnd
|
||||
BORG_VERSION="";
|
||||
@@ -95,8 +95,8 @@ PRINTF_INFO_STRING="%-23s: %s\n";
|
||||
PRINTF_MASTER_BLOCK="=== [%-8s: %19s] ==[%s]====================================>\n";
|
||||
PRINTF_SUB_BLOCK="|-- [%-8s: %19s] --[%s]------------------------------------>\n";
|
||||
PRINTF_SUBEXT_BLOCK="|-- [%-8s: %s: %19s] --[%s]------------------------------------>\n";
|
||||
PRINTF_DB_SUB_BLOCK=">>- [%-8s: %s] ==[%s]=======================>\n";
|
||||
PRINTF_DB_RUN_TIME_SUB_BLOCK=">>- [%-8s: %s] ==[%s]==[Run time: %s:]=======================>\n";
|
||||
PRINTF_DB_SUB_BLOCK="|>- [%-8s: %s] ==[%s]=======================>\n";
|
||||
PRINTF_DB_RUN_TIME_SUB_BLOCK=">>- [%-8s: %s] ==[%s]==[Run time: %s]=======================>\n";
|
||||
# opt flags
|
||||
OPT_VERBOSE="";
|
||||
OPT_PROGRESS="";
|
||||
@@ -153,9 +153,11 @@ MYSQL_DB_CONFIG="";
|
||||
MYSQL_DB_CONFIG_PARAM="";
|
||||
# gitea module
|
||||
GIT_USER="";
|
||||
GITEA_TMP="";
|
||||
GITEA_WORKING_DIR="";
|
||||
GITEA_TEMP_DIR="";
|
||||
GITEA_BIN="";
|
||||
GITEA_CONFIG="";
|
||||
GITEA_EXPORT_TYPE="";
|
||||
# zabbix module
|
||||
ZABBIX_DUMP_BIN="";
|
||||
ZABBIX_CONFIG="";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Backup gitea database, all git folders and gitea settings
|
||||
|
||||
MODULE="gitea"
|
||||
MODULE_VERSION="1.1.4";
|
||||
MODULE_VERSION="1.2.0";
|
||||
|
||||
DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
# set last edit date + time
|
||||
MODULE="mysql"
|
||||
MODULE_VERSION="1.1.2";
|
||||
MODULE_VERSION="1.1.3";
|
||||
|
||||
DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
# set last edit date + time
|
||||
MODULE="pgsql"
|
||||
MODULE_VERSION="1.2.2";
|
||||
MODULE_VERSION="1.2.4";
|
||||
|
||||
|
||||
DIR="${BASH_SOURCE%/*}"
|
||||
@@ -170,6 +170,7 @@ else
|
||||
echo "Prune repository with keep${KEEP_INFO:1}";
|
||||
${BORG_PRUNE};
|
||||
fi;
|
||||
DURATION=$[ $(date +'%s')-$LOCAL_START ];
|
||||
printf "${PRINTF_DB_RUN_TIME_SUB_BLOCK}" "BACKUP" "${db}" "${MODULE}" "$(convert_time ${DURATION})";
|
||||
|
||||
# get list of tables
|
||||
@@ -271,6 +272,7 @@ else
|
||||
else
|
||||
echo "- [E] ${db}";
|
||||
fi;
|
||||
DURATION=$[ $(date +'%s')-$LOCAL_START ];
|
||||
printf "${PRINTF_DB_RUN_TIME_SUB_BLOCK}" "DONE" "${db}" "${MODULE}" "$(convert_time ${DURATION})";
|
||||
done;
|
||||
fi;
|
||||
|
||||
Reference in New Issue
Block a user