bump to 1.2.3

This commit is contained in:
Foxly IT 2022-01-16 12:29:15 +01:00
parent e436bdd6a5
commit 36cff945d3
2 changed files with 16 additions and 16 deletions

View file

@ -42,5 +42,5 @@ In order to back up data, a repository must first be created. This can be create
#### Recommended
* Debian 10 (__Buster__)
* Raspbian 10 (__Buster__)
* Debian 10/11 (__Buster__)
* Raspbian 10/11 (__Buster__)

View file

@ -11,9 +11,9 @@ NUM_CORES=$(nproc || echo 1)
# You need to adjust the settings in the #
# TODO section for yourself #
# Author : Mark Schenk <info@foxly.de> #
# Date : 2021-10-15 10:03 #
# Date : 2022-01-16 12:26 #
# License : MIT #
# Version : 1.2.2 #
# Version : 1.2.3 #
# #
# Usage : bash ./backup.sh #
##############################################################
@ -21,7 +21,7 @@ NUM_CORES=$(nproc || echo 1)
# Helper functions #
####################
backup_VER="v1.2.2"
backup_VER="v1.2.3"
str_repeat() {
@ -121,24 +121,24 @@ backupRepo="/path/to/Repo"
# DATABASES: Remove "#" for the correct database #
# #
# You can back up all databases or specific databases. For all databases enter "all". --> Optional only for MariaDB/MySQL databases stored in CloudPanel. #
databases="all" #
databases="all" #
# #
echo -e "\e[93mStart MariaDB/MySQL database backup" #
clpctl db:backup --databases=$databases #
echo -e "${FGREEN}Backup has been finished successfully after $(displaytime $(($(date +%s) - START)))!${FEND}" #
echo -e "\e[93mStart MariaDB/MySQL database backup" #
clpctl db:backup --databases=$databases #
echo -e "${FGREEN}Backup has been finished successfully after $(displaytime $(($(date +%s) - START)))!${FEND}" #
#########################################################################################################################################################################
#########################################################################################################################################################################
# PostgreSQL #
#########################################################################################################################################################################
# Optional only for PostgreSQL databases that are not stored in CloudPanel. #
echo -e "\e[93mStart PostgreSQL database backup" #
databases="DATABASENAME"
mkdir -p /home/cloudpanel/backups/$databases #
postbackupdir="/home/cloudpanel/backups/$databases" #
sudo -u postgres pg_dump $databases > $postbackupdir/BBNC-$(date +%d-%m-%Y_%H-%M-%S).sql #
echo -e "${FGREEN}Backup has been finished successfully after $(displaytime $(($(date +%s) - START)))!${FEND}" #
# echo -e "\e[93mStart PostgreSQL database backup" #
# databases="DATABASENAME" #
# mkdir -p /home/cloudpanel/backups/$databases #
# postbackupdir="/home/cloudpanel/backups/$databases" #
# #
# sudo -u postgres pg_dump $databases > $postbackupdir/BBNC-$(date +%d-%m-%Y_%H-%M-%S).sql #
# echo -e "${FGREEN}Backup has been finished successfully after $(displaytime $(($(date +%s) - START)))!${FEND}" #
#########################################################################################################################################################################