15 lines
325 B
Bash
Executable File
15 lines
325 B
Bash
Executable File
#! /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
|