bump to 1.2.3
This commit is contained in:
parent
e436bdd6a5
commit
36cff945d3
2 changed files with 16 additions and 16 deletions
|
@ -42,5 +42,5 @@ In order to back up data, a repository must first be created. This can be create
|
||||||
|
|
||||||
#### Recommended
|
#### Recommended
|
||||||
|
|
||||||
* Debian 10 (__Buster__)
|
* Debian 10/11 (__Buster__)
|
||||||
* Raspbian 10 (__Buster__)
|
* Raspbian 10/11 (__Buster__)
|
||||||
|
|
28
backup.sh
28
backup.sh
|
@ -11,9 +11,9 @@ NUM_CORES=$(nproc || echo 1)
|
||||||
# You need to adjust the settings in the #
|
# You need to adjust the settings in the #
|
||||||
# TODO section for yourself #
|
# TODO section for yourself #
|
||||||
# Author : Mark Schenk <info@foxly.de> #
|
# Author : Mark Schenk <info@foxly.de> #
|
||||||
# Date : 2021-10-15 10:03 #
|
# Date : 2022-01-16 12:26 #
|
||||||
# License : MIT #
|
# License : MIT #
|
||||||
# Version : 1.2.2 #
|
# Version : 1.2.3 #
|
||||||
# #
|
# #
|
||||||
# Usage : bash ./backup.sh #
|
# Usage : bash ./backup.sh #
|
||||||
##############################################################
|
##############################################################
|
||||||
|
@ -21,7 +21,7 @@ NUM_CORES=$(nproc || echo 1)
|
||||||
# Helper functions #
|
# Helper functions #
|
||||||
####################
|
####################
|
||||||
|
|
||||||
backup_VER="v1.2.2"
|
backup_VER="v1.2.3"
|
||||||
|
|
||||||
|
|
||||||
str_repeat() {
|
str_repeat() {
|
||||||
|
@ -121,24 +121,24 @@ backupRepo="/path/to/Repo"
|
||||||
# DATABASES: Remove "#" for the correct database #
|
# 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. #
|
# 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" #
|
echo -e "\e[93mStart MariaDB/MySQL database backup" #
|
||||||
clpctl db:backup --databases=$databases #
|
clpctl db:backup --databases=$databases #
|
||||||
echo -e "${FGREEN}Backup has been finished successfully after $(displaytime $(($(date +%s) - START)))!${FEND}" #
|
echo -e "${FGREEN}Backup has been finished successfully after $(displaytime $(($(date +%s) - START)))!${FEND}" #
|
||||||
#########################################################################################################################################################################
|
#########################################################################################################################################################################
|
||||||
|
|
||||||
#########################################################################################################################################################################
|
#########################################################################################################################################################################
|
||||||
# PostgreSQL #
|
# PostgreSQL #
|
||||||
#########################################################################################################################################################################
|
#########################################################################################################################################################################
|
||||||
# Optional only for PostgreSQL databases that are not stored in CloudPanel. #
|
# Optional only for PostgreSQL databases that are not stored in CloudPanel. #
|
||||||
echo -e "\e[93mStart PostgreSQL database backup" #
|
# echo -e "\e[93mStart PostgreSQL database backup" #
|
||||||
databases="DATABASENAME"
|
# databases="DATABASENAME" #
|
||||||
mkdir -p /home/cloudpanel/backups/$databases #
|
# mkdir -p /home/cloudpanel/backups/$databases #
|
||||||
postbackupdir="/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 #
|
# 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 "${FGREEN}Backup has been finished successfully after $(displaytime $(($(date +%s) - START)))!${FEND}" #
|
||||||
#########################################################################################################################################################################
|
#########################################################################################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue