2022-01-30 16:16:12 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Remote backup script
|
2022-05-21 20:28:28 -04:00
|
|
|
# Either push files to remote or receive full backup tarballs
|
|
|
|
|
|
|
|
while getopts ":pr" o; do
|
|
|
|
case "${o}" in
|
|
|
|
p) ACTION=PUSH ;;
|
|
|
|
r) ACTION=RECV ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $ACTION = PUSH ]
|
|
|
|
then
|
|
|
|
rsync -avzP \
|
|
|
|
--chown=dogeystamp:sftpr \
|
|
|
|
--exclude=med/mus \
|
|
|
|
--exclude=med/gv \
|
|
|
|
--exclude=dox/dow \
|
|
|
|
--exclude=dox/rss \
|
|
|
|
--exclude=dox/rem \
|
|
|
|
--exclude=dox/proj \
|
|
|
|
--exclude=dox/vms \
|
|
|
|
--exclude=med/pix/hdri \
|
|
|
|
--exclude=med/memes/woof/quar \
|
|
|
|
~/med ~/dox dogeystamp@lambda:/mnt/disk/uv/
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $ACTION = RECV ]
|
|
|
|
then
|
|
|
|
rsync -avzP \
|
2022-06-19 16:40:13 -04:00
|
|
|
dogeystamp@lambda:/mnt/disk_b/ ~/arc/bk/
|
|
|
|
rsync -avzP \
|
|
|
|
dogeystamp@lambda:/mnt/disk/data/navidrome/mus/ ~/med/mus
|
2022-05-21 20:28:28 -04:00
|
|
|
fi
|
2022-01-30 16:16:12 -05:00
|
|
|
|