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

57 lines
2.6 KiB
Plaintext
Raw Normal View History

2022-02-17 15:17:17 +01:00
#!/bin/bash
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
2022-11-27 13:01:46 +01:00
# unlock ssh key
if ! ssh-add -T "${sshkeypath}.pub" &>/dev/null; then
ssh-add -q "$sshkeypath"
fi
2022-02-17 15:17:17 +01:00
# transfer to kavita
# books
echo Kavita books upload
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Unterhaltung/ ${user}@${server}:/mnt/books/kavita/books/
2022-02-17 15:17:17 +01:00
# manga
echo Kavita manga upload
2022-11-22 16:56:56 +01:00
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Manga/ ${user}@${server}:/mnt/books/kavita/manga/
2022-02-17 15:17:17 +01:00
# Tech
echo Kavita tech upload
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Tech/ ${user}@${server}:/mnt/books/kavita/tech/
2022-02-17 15:17:17 +01:00
# other
echo Kavita other upload
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/other/ ${user}@${server}:/mnt/books/kavita/other/
2022-02-17 15:17:17 +01:00
2022-03-28 19:57:37 +02:00
# download from kavita
# books
2022-05-06 21:55:59 +02:00
#echo Downloading books
2022-11-20 16:37:48 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/books/ /home/marc/Nextcloud/Books/Unterhaltung/
2022-03-28 19:57:37 +02:00
# manga
echo Kavita manga download
2023-01-28 17:23:36 +01:00
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/manga/ /home/marc/Nextcloud/Books/Manga/
2022-03-28 19:57:37 +02:00
# Tech
#echo Downloading tech
2022-11-20 16:37:48 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/tech/ /home/marc/Nextcloud/Books/Tech/
2022-03-28 19:57:37 +02:00
# other
#echo Downloading other
2022-11-20 16:37:48 +01:00
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/other/ /home/marc/Nextcloud/Books/other/
2023-08-27 19:48:19 +02:00
# transfer to kavita-nightly
# books
echo Kavita Nightly books upload
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Unterhaltung/ ${user}@${server}:/mnt/books/kavita-nightly/books/
# manga
echo Kavita Nightly manga upload
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Manga/ ${user}@${server}:/mnt/books/kavita-nightly/manga/
# Tech
echo Kavita Nightly tech upload
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Tech/ ${user}@${server}:/mnt/books/kavita-nightly/tech/
# other
echo Kavita Nightly other upload
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/other/ ${user}@${server}:/mnt/books/kavita-nightly/other/