#! /bin/sh set -e . /etc/lbu/lbu.conf hostname=$(hostname) mkdir -p /srv/backups/$hostname/ install -p -m 0600 /media/$LBU_MEDIA/$hostname.*.tar.gz /srv/backups/$hostname/ for path in /srv/backups/$hostname/$hostname.*.tar.gz; do filename=$(basename $path) [ -f /media/$LBU_MEDIA/$filename ] || rm $path done sleep 4h