psc-per-vm/borgmatic
Thomas Peterson 2de6d926c1 Update 4 files
- /mk_docker.py
- /psc_cron
- /borgmatic.conf
- /borgmatic
2024-01-31 17:10:21 +00:00

12 lines
274 B
Bash

#!/bin/bash
if [ -f "/usr/bin/borgmatic" ]; then
echo '<<<borgmatic_backup>>>'
BMCMD="$(borgmatic list 2> tee | tail -n1 | grep -P '\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d' -o)"
if [ $? -eq 0 ]; then
D=$(date -d "$BMCMD" "+%s")
echo "$D"
else
echo "0"
fi
fi