Added "automatic" mode
This commit is contained in:
1 parent
fab1fe223b
commit
51aff02a3d
1 file changed
+36
-2
+36
-2
@@ -2,10 +2,12 @@
|
|||||||
# Version 0.2.2 - BETA ! !
|
# Version 0.2.2 - BETA ! !
|
||||||
# Date 28.05.2020
|
# Date 28.05.2020
|
||||||
# Author DerDanilo
|
# Author DerDanilo
|
||||||
# Contributors aboutte, xmirakulix, bootsie123
|
# Contributors aboutte, xmirakulix, bootsie123, TechHome
|
||||||
|
|
||||||
# set vars
|
# set vars
|
||||||
|
|
||||||
|
SILENT=${1}
|
||||||
|
|
||||||
# always exit on error
|
# always exit on error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -40,6 +42,8 @@ _filename4="$_tdir/proxmox_backup_"$_HOSTNAME"_"$_now".tar.gz"
|
|||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
if [ "$SILENT" != "-a" ]
|
||||||
|
then
|
||||||
function description {
|
function description {
|
||||||
clear
|
clear
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@@ -71,6 +75,36 @@ EOF
|
|||||||
read dummy
|
read dummy
|
||||||
clear
|
clear
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
clear
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
Proxmox Server Config Backup
|
||||||
|
Hostname: "$_HOSTNAME"
|
||||||
|
Timestamp: "$_now"
|
||||||
|
|
||||||
|
Files to be saved:
|
||||||
|
"/etc/*, /var/lib/pve-cluster/*, /root/*"
|
||||||
|
|
||||||
|
Backup target:
|
||||||
|
"$_bdir"
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
|
||||||
|
This script is supposed to backup your node config and not VM
|
||||||
|
or LXC container data. To backup your instances please use the
|
||||||
|
built in backup feature or a backup solution that runs within
|
||||||
|
your instances.
|
||||||
|
|
||||||
|
For questions or suggestions please contact DerDanilo at
|
||||||
|
https://github.com/DerDanilo/proxmox-stuff
|
||||||
|
or me at https://github.com/marrobHD/proxmox-tools
|
||||||
|
-----------------------------------------------------------------
|
||||||
|
|
||||||
|
Auto proceed automatically or CTRL-C to abort.
|
||||||
|
|
||||||
|
EOF
|
||||||
|
sleep 2
|
||||||
|
fi
|
||||||
|
|
||||||
function are-we-root-abort-if-not {
|
function are-we-root-abort-if-not {
|
||||||
if [[ ${EUID} -ne 0 ]] ; then
|
if [[ ${EUID} -ne 0 ]] ; then
|
||||||
@@ -121,7 +155,7 @@ function startservices {
|
|||||||
##########
|
##########
|
||||||
|
|
||||||
|
|
||||||
description
|
#description
|
||||||
are-we-root-abort-if-not
|
are-we-root-abort-if-not
|
||||||
check-num-backups
|
check-num-backups
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user