#!/usr/bin/env bash
. /mirror/lib/sync.sh
ffts="fullfiletimelist-rocky"
checkresult=$(rsync -4 --no-motd --dry-run --out-format="%n" "$source/${ffts}" "./data/${ffts}")
if [[ -z "$checkresult" ]]; then
    exit 0
fi

#get $source --exclude="*.~tmp~" -4

sudo nice -n -2 sudo -u mirror \
    rsync -vrlptDSH --exclude="*.~tmp~" --delete-delay --delay-updates -4 \
    $source data/

ssh 210.117.237.34 '/mirror/rocky.sh'
