--- /dev/null
+#!/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