]> git.sven.stormbind.net Git - sven/scripts.git/blobdiff - hetzner/hetznerbackupv2.sh
Ignore timeouts on the envertech portal
[sven/scripts.git] / hetzner / hetznerbackupv2.sh
diff --git a/hetzner/hetznerbackupv2.sh b/hetzner/hetznerbackupv2.sh
deleted file mode 100755 (executable)
index 86c7ede..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-
-### Halt on errors
-set -e
-
-### Do not inherit the following variables
-# Safety net just in case some calls this
-# script in a bogus way.
-unset $dry
-
-### Debug
-#set -x 
-#set dry="--dry-run"
-
-### General settings
-export PASSPHRASE=s
-export FTP_PASSWORD=s
-FTP_USER=uxxx
-FTP_HOST=uxxx.your-backup.de
-LOCKFILE="/var/lock/backup/hetznerbackup"
-PROTO=ssh
-
-## Backup job for main
-job_main() {
-    echo "Backing up main"
-
-    echo "Going for /etc"
-    duplicity $BMODE $dry /etc $PROTO://$FTP_USER@$FTP_HOST/main/etc
-    duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/etc
-
-    echo "Going for /home"
-    duplicity $BMODE $dry /home $PROTO://$FTP_USER@$FTP_HOST/main/home
-    duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/home
-
-    echo "Going for /var/www"
-    duplicity $BMODE $dry /var/www $PROTO://$FTP_USER@$FTP_HOST/main/var/www
-    duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/var/www
-
-    echo "Going for /var/lib/automysqlbackup"
-    if [ -e /var/lib/automysqlbackup/backupdone ]; then
-           duplicity $BMODE $dry /var/lib/automysqlbackup $PROTO://$FTP_USER@$FTP_HOST/main/automysqlbackup
-           duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/automysqlbackup
-    else
-       echo "WARNING: It seems that the last mysql backup is still runing"
-       echo "Skipping mysql backup - please re-schedule"
-    fi
-}
-
-### check for other runing instances of this script
-if [ -e $LOCKFILE ]; then
-    echo "Lockfile $LOCKFILE found - aborting"
-    echo "This is a typical result of a failed backup run, please contact your admin"
-    exit 5
-else
-    touch $LOCKFILE
-fi
-
-### Set the duplicity backup mode we would like to use
-if [[ $(LANG=C; date +%A) =~ Sunday ]]; then
-    echo "Runing in full mode"
-    BMODE="full"
-else
-    echo "Runing in incr mode"
-    BMODE="incr"
-fi
-
-### Start the backup jobs
-job_main
-
-### remove the lockfile
-rm $LOCKFILE