# 0 0 * * SAT /mnt/cloud/nc_dmcl/btrbk/btrfs_scrub.sh > /var/log/backup/btrfs_log.log for fs in $(grep ' btrfs ' /proc/mounts | cut -d' ' -f1 | sort -u) do starttime="$(date "+%Y-%m-%d %H:%M:%S")" printf "Starting btrfs scrub on $fs" btrfs scrub start -Bd "$fs" journalctl -q -k --since "$starttime" | grep BTRFS printf "Scrub for $fs has finished" done docker run --rm -v /mnt/cloud/nc_dmcl/btrbk/scrub/:/attachment mcr.microsoft.com/powershell pwsh /external/sendEmail.ps1