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

63 lines
3.0 KiB
Plaintext
Raw 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
server=172.18.50.100
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-11-23 20:03:04 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/Unterhaltung/ ${user}@${server}:/mnt/books/kavita/books/
2023-11-23 18:48:31 +01:00
# manga
echo Kavita manga upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/Manga/ ${user}@${server}:/mnt/books/kavita/manga/
2023-11-23 18:48:31 +01:00
# guides
echo Kavita guides upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/Guides/ ${user}@${server}:/mnt/books/kavita/guides/
2023-11-23 18:48:31 +01:00
# Tech
echo Kavita tech upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/Tech/ ${user}@${server}:/mnt/books/kavita/tech/
2023-11-23 18:48:31 +01:00
# other
echo Kavita other upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/other/ ${user}@${server}:/mnt/books/kavita/other/
2023-11-23 18:48:31 +01:00
# download from kavita
# books
#echo Downloading books
2023-11-23 20:03:04 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/books/ /home/exu/Nextcloud/Books/Unterhaltung/
2023-11-23 18:48:31 +01:00
# manga
echo Kavita manga download
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/manga/ /home/exu/Nextcloud/Books/Manga/
2023-11-23 18:48:31 +01:00
# Tech
#echo Downloading tech
2023-11-23 20:03:04 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/tech/ /home/exu/Nextcloud/Books/Tech/
2023-11-23 18:48:31 +01:00
# other
#echo Downloading other
2023-11-23 20:03:04 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/other/ /home/exu/Nextcloud/Books/other/
2023-11-23 18:48:31 +01:00
# transfer to kavita-nightly
# books
echo Kavita Nightly books upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/Unterhaltung/ ${user}@${server}:/mnt/books/kavita-nightly/books/
2023-11-23 18:48:31 +01:00
# manga
echo Kavita Nightly manga upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/Manga/ ${user}@${server}:/mnt/books/kavita-nightly/manga/
2023-11-23 18:48:31 +01:00
# guides
echo Kavita guides upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/Guides/ ${user}@${server}:/mnt/books/kavita-nightly/guides/
2023-11-23 18:48:31 +01:00
# Tech
echo Kavita Nightly tech upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/Tech/ ${user}@${server}:/mnt/books/kavita-nightly/tech/
2023-11-23 18:48:31 +01:00
# other
echo Kavita Nightly other upload
2023-11-23 20:03:04 +01:00
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/exu/Nextcloud/Books/other/ ${user}@${server}:/mnt/books/kavita-nightly/other/