configs/arch-config/scripts/in_path/sc-manga-update

46 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2023-11-23 20:03:04 +01:00
#!/usr/bin/env bash
2023-11-23 18:48:31 +01:00
set -euo pipefail
user=exu
2023-12-08 18:09:07 +01:00
server=he1app16
2023-11-23 18:48:31 +01:00
port=22
sshkeypath=$HOME/.ssh/id_ed25519
# don't transfer to the storage box directly, leads to mangled file names
# see: https://serverfault.com/a/765951
# unlock ssh key
if ! ssh-add -T "${sshkeypath}.pub" &>/dev/null; then
ssh-add -q "$sshkeypath"
fi
# transfer to kavita
# books
echo Kavita books upload
2023-12-08 18:13:52 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Reading/books/ ${user}@${server}:/mnt/books/kavita/books/
2023-11-23 18:48:31 +01:00
# manga
echo Kavita manga upload
2023-12-08 18:13:52 +01:00
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Reading/manga/ ${user}@${server}:/mnt/books/kavita/manga/
2023-11-23 18:48:31 +01:00
# guides
echo Kavita guides upload
2023-12-08 18:13:52 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Reading/guides/ ${user}@${server}:/mnt/books/kavita/guides/
2023-11-23 18:48:31 +01:00
# Tech
echo Kavita tech upload
2023-12-08 18:13:52 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Reading/tech/ ${user}@${server}:/mnt/books/kavita/tech/
2023-11-23 18:48:31 +01:00
# other
echo Kavita other upload
2023-12-08 18:13:52 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Reading/other/ ${user}@${server}:/mnt/books/kavita/other/
2023-11-23 18:48:31 +01:00
# download from kavita
# books
#echo Downloading books
2023-12-08 18:13:52 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/books/ /home/exu/Nextcloud/Reading/Unterhaltung/
2023-11-23 18:48:31 +01:00
# manga
echo Kavita manga download
2023-12-08 18:13:52 +01:00
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/manga/ /home/exu/Nextcloud/Reading/manga/
2023-11-23 18:48:31 +01:00
# Tech
#echo Downloading tech
2023-12-08 18:13:52 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/tech/ /home/exu/Nextcloud/Reading/Tech/
2023-11-23 18:48:31 +01:00
# other
#echo Downloading other
2023-12-08 18:13:52 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/other/ /home/exu/Nextcloud/Reading/other/