ok tr y this

This commit is contained in:
May 2024-07-03 00:09:17 -07:00
parent bd9f706d76
commit 1c426f81c2
Signed by: split
GPG key ID: C325C61F0BF517C0

View file

@ -3,13 +3,13 @@
source /.env
FILENAME="$NAME $(date +%Y-%m-%d\ %H-%M).tgz"
DIRNAME = "/tmp/$(date +%Y\/%m)"
# tar volumes
tar -aczf "/tmp/$FILENAME" -C /volumes .
tar -aczf "$DIRNAME/$FILENAME" -C /volumes .
# ship to host
cd /tmp
rsync -R -e "ssh -i /id" --include="$FILENAME" $NAME@$HOST:/home/$NAME/$(date +%Y-%m)/
rsync -r -e "ssh -i /id" . $NAME@$HOST:/home/$NAME/
# delete backup
rm -rf /tmp/*
rm -rf $DIRNAME