Add archive_legion.sh rsync script

This commit is contained in:
dctrud 2023-05-18 19:56:05 +01:00
parent 6c7cb4d534
commit f404ab1894
1 changed files with 16 additions and 0 deletions

16
bin/archive_legion.sh Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
HOST="LEGION"
DEST="dctrud@piran:/usb/Archive"
SOURCE="/mnt/d/Archive/"
if [ $(hostname -s) != "${HOST}" ]; then
echo "Must be run from ${HOST}"
exit 255
fi
echo "Sync ${SOURCE} to ${DEST}"
sudo rsync -avx --progress "$SOURCE" "$DEST"
echo
echo DONE
echo