Skip to content
Snippets Groups Projects
Select Git revision
  • ab62f6ded374330b13989057566939dcfb965906
  • master default protected
  • 133-fail2ban-page
  • reorganisation
  • 16-maintenace-service
  • 11-fail2ban
  • 6-monit-update
  • 7-dolibarr-fail2ban
  • 6-surveillance-interne-des-serveur
  • test-glpi
  • 2-migrate-to-phpfpm
  • jessie
  • github
13 results

Backups.sh

Blame
  • Backups.sh 660 B
    #!/bin/bash
    echo "RUN $(basename "$0") ==="
    
    
    DIR=$(realpath $(dirname $0)/..)
    if [ ! -e $DIR/main.env ]
    then
        echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it"
        exit 1
    else
        echo "Environment file loaded"
    fi
    . $DIR/main.env
    
    duplicity_dir="/opt/duplicity-ftp-backup/"
    duplicity_alt_dir="/root/duplicity-ftp-backup/"
    if [ -d "$duplicity_dir" ]; then
        backup_dir="$duplicity_dir"
    elif [ -d "$duplicity_alt_dir"]; then
        backup_dir="$duplicity_alt_dir"
    fi
    if [ -z "$backup_dir" ]; then
        echo "WARNING duplicity backup system not found"
        exit 1
    fi
    cd $backup_dir
    git pull
    bash $DIR/checks/backups.sh