]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Renaming bin/zelos-make_backup_and_do_update.sh.sh -> bin/zelos-make_backup_and_do_up...
authorFrank Brehm <frank@brehm-online.com>
Fri, 26 Nov 2021 08:50:51 +0000 (09:50 +0100)
committerFrank Brehm <frank@brehm-online.com>
Fri, 26 Nov 2021 08:50:51 +0000 (09:50 +0100)
bin/zelos-make_backup_and_do_update.sh [new file with mode: 0755]
bin/zelos-make_backup_and_do_update.sh.sh [deleted file]

diff --git a/bin/zelos-make_backup_and_do_update.sh b/bin/zelos-make_backup_and_do_update.sh
new file mode 100755 (executable)
index 0000000..8b4132e
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+# by @rwaffen
+
+#update zelos
+DATE=$(date '+%Y-%m-%d')
+is_mounted=$(mount | grep /mnt/storagebox/backup -c)
+backup_box_pass=$1 #see tpm
+
+if [ -z "${backup_box_pass}" ]; then
+  echo "Bitte Password aus TPM entnehmen!"
+  exit 1
+fi
+
+# mount hetzner backup disk
+if [ $is_mounted -ne 1 ]; then
+  mount.cifs -o user=u234365,pass=${backup_box_pass} //u234365.your-storagebox.de/backup /mnt/storagebox/backup
+fi
+
+# delete older backups
+find /mnt/storagebox/backup -mtime +20 -delete
+
+# make file backups
+echo "packe /root"
+tar cfz /mnt/storagebox/backup/${DATE}_root.tgz /root
+
+echo "packe /opt/asterisk"
+tar cfz /mnt/storagebox/backup/${DATE}_asterisk.tgz /opt/asterisk
+
+echo "packe /etc"
+tar cfz /mnt/storagebox/backup/${DATE}_etc.tgz /etc
+
+echo "packe /home"
+tar cfz /mnt/storagebox/backup/${DATE}_home.tgz /home
+
+# make db backup
+echo "mache db dump"
+echo "kann so 60min. dauern..."
+time /root/MysqlDumps/backupZabbixDB.sh
+
+mv $(find /opt/dbstorage -name "*.bz2" -daystart -ctime 0) /mnt/storagebox/backup
+
+# update system
+yum update -y
+
+# reboot
+systemctl reboot
diff --git a/bin/zelos-make_backup_and_do_update.sh.sh b/bin/zelos-make_backup_and_do_update.sh.sh
deleted file mode 100644 (file)
index 8b4132e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-# by @rwaffen
-
-#update zelos
-DATE=$(date '+%Y-%m-%d')
-is_mounted=$(mount | grep /mnt/storagebox/backup -c)
-backup_box_pass=$1 #see tpm
-
-if [ -z "${backup_box_pass}" ]; then
-  echo "Bitte Password aus TPM entnehmen!"
-  exit 1
-fi
-
-# mount hetzner backup disk
-if [ $is_mounted -ne 1 ]; then
-  mount.cifs -o user=u234365,pass=${backup_box_pass} //u234365.your-storagebox.de/backup /mnt/storagebox/backup
-fi
-
-# delete older backups
-find /mnt/storagebox/backup -mtime +20 -delete
-
-# make file backups
-echo "packe /root"
-tar cfz /mnt/storagebox/backup/${DATE}_root.tgz /root
-
-echo "packe /opt/asterisk"
-tar cfz /mnt/storagebox/backup/${DATE}_asterisk.tgz /opt/asterisk
-
-echo "packe /etc"
-tar cfz /mnt/storagebox/backup/${DATE}_etc.tgz /etc
-
-echo "packe /home"
-tar cfz /mnt/storagebox/backup/${DATE}_home.tgz /home
-
-# make db backup
-echo "mache db dump"
-echo "kann so 60min. dauern..."
-time /root/MysqlDumps/backupZabbixDB.sh
-
-mv $(find /opt/dbstorage -name "*.bz2" -daystart -ctime 0) /mnt/storagebox/backup
-
-# update system
-yum update -y
-
-# reboot
-systemctl reboot