Add "Guides" upload
This commit is contained in:
parent
5eafdb21fb
commit
550c79be7c
@ -1,56 +1,62 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
user=exu
|
user=exu
|
||||||
server=172.18.50.100
|
server=172.18.50.100
|
||||||
port=22
|
port=22
|
||||||
sshkeypath=$HOME/.ssh/id_ed25519
|
sshkeypath=$HOME/.ssh/id_ed25519
|
||||||
# don't transfer to the storage box directly, leads to mangled file names
|
# don't transfer to the storage box directly, leads to mangled file names
|
||||||
# see: https://serverfault.com/a/765951
|
# see: https://serverfault.com/a/765951
|
||||||
|
|
||||||
# unlock ssh key
|
# unlock ssh key
|
||||||
if ! ssh-add -T "${sshkeypath}.pub" &>/dev/null; then
|
if ! ssh-add -T "${sshkeypath}.pub" &>/dev/null; then
|
||||||
ssh-add -q "$sshkeypath"
|
ssh-add -q "$sshkeypath"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# transfer to kavita
|
# transfer to kavita
|
||||||
# books
|
# books
|
||||||
echo Kavita books upload
|
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/
|
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Unterhaltung/ ${user}@${server}:/mnt/books/kavita/books/
|
||||||
# manga
|
# manga
|
||||||
echo Kavita manga upload
|
echo Kavita manga upload
|
||||||
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Manga/ ${user}@${server}:/mnt/books/kavita/manga/
|
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Manga/ ${user}@${server}:/mnt/books/kavita/manga/
|
||||||
# Tech
|
# guides
|
||||||
echo Kavita tech upload
|
echo Kavita guides upload
|
||||||
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Tech/ ${user}@${server}:/mnt/books/kavita/tech/
|
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Guides/ ${user}@${server}:/mnt/books/kavita/guides/
|
||||||
# other
|
# Tech
|
||||||
echo Kavita other upload
|
echo Kavita tech upload
|
||||||
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/other/ ${user}@${server}:/mnt/books/kavita/other/
|
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Tech/ ${user}@${server}:/mnt/books/kavita/tech/
|
||||||
|
# other
|
||||||
# download from kavita
|
echo Kavita other upload
|
||||||
# books
|
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/other/ ${user}@${server}:/mnt/books/kavita/other/
|
||||||
#echo Downloading books
|
|
||||||
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/books/ /home/marc/Nextcloud/Books/Unterhaltung/
|
# download from kavita
|
||||||
# manga
|
# books
|
||||||
echo Kavita manga download
|
#echo Downloading books
|
||||||
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/manga/ /home/marc/Nextcloud/Books/Manga/
|
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/books/ /home/marc/Nextcloud/Books/Unterhaltung/
|
||||||
# Tech
|
# manga
|
||||||
#echo Downloading tech
|
echo Kavita manga download
|
||||||
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/tech/ /home/marc/Nextcloud/Books/Tech/
|
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/manga/ /home/marc/Nextcloud/Books/Manga/
|
||||||
# other
|
# Tech
|
||||||
#echo Downloading other
|
#echo Downloading tech
|
||||||
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/other/ /home/marc/Nextcloud/Books/other/
|
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/tech/ /home/marc/Nextcloud/Books/Tech/
|
||||||
|
# other
|
||||||
# transfer to kavita-nightly
|
#echo Downloading other
|
||||||
# books
|
#rsync -ur --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" ${user}@${server}:/mnt/books/kavita/other/ /home/marc/Nextcloud/Books/other/
|
||||||
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/
|
# transfer to kavita-nightly
|
||||||
# manga
|
# books
|
||||||
echo Kavita Nightly manga upload
|
echo Kavita Nightly books upload
|
||||||
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Manga/ ${user}@${server}:/mnt/books/kavita-nightly/manga/
|
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Unterhaltung/ ${user}@${server}:/mnt/books/kavita-nightly/books/
|
||||||
# Tech
|
# manga
|
||||||
echo Kavita Nightly tech upload
|
echo Kavita Nightly manga 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/
|
rsync -urtzv --progress --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Manga/ ${user}@${server}:/mnt/books/kavita-nightly/manga/
|
||||||
# other
|
# guides
|
||||||
echo Kavita Nightly other upload
|
echo Kavita guides 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/
|
rsync -urtzv --progress --delete --bwlimit=3M -e "ssh -i $sshkeypath -p $port" /home/marc/Nextcloud/Books/Guides/ ${user}@${server}:/mnt/books/kavita-nightly/guides/
|
||||||
|
# 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/
|
||||||
|
Loading…
Reference in New Issue
Block a user