Add transfer to nas in background
This commit is contained in:
parent
8fe55b81ed
commit
640ecc0ea6
@ -5,9 +5,12 @@ user=exu
|
|||||||
server=172.18.50.102
|
server=172.18.50.102
|
||||||
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
|
# NOTE 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
|
||||||
|
|
||||||
|
# transfer to nas in background
|
||||||
|
rsync -uvr --progress /mnt/storage/MediaLibrary/{Movies,other,Patreon,Shows,YouTube} /mnt/lan1nas1/ >/dev/null &
|
||||||
|
|
||||||
# transfer Music
|
# transfer Music
|
||||||
rsync -uvrL --progress --bwlimit=4M -e "ssh -i $sshkeypath -p $port" /home/marc/Musik/ ${user}@${server}:/mnt/media/Musik/
|
rsync -uvrL --progress --bwlimit=4M -e "ssh -i $sshkeypath -p $port" /home/marc/Musik/ ${user}@${server}:/mnt/media/Musik/
|
||||||
|
|
||||||
@ -22,3 +25,9 @@ rsync -uvr --progress --bwlimit=4M -e "ssh -i $sshkeypath -p $port" /mnt/storage
|
|||||||
|
|
||||||
# transfer downloaded YouTube videos
|
# transfer downloaded YouTube videos
|
||||||
rsync -uvr --progress --bwlimit=4M -e "ssh -i $sshkeypath -p $port" /mnt/storage/MediaLibrary/YouTube/ ${user}@${server}:/mnt/media/YouTube/
|
rsync -uvr --progress --bwlimit=4M -e "ssh -i $sshkeypath -p $port" /mnt/storage/MediaLibrary/YouTube/ ${user}@${server}:/mnt/media/YouTube/
|
||||||
|
|
||||||
|
# NOTE wait to make sure the transfer to the nas is complete as well
|
||||||
|
# https://stackoverflow.com/a/41791336
|
||||||
|
wait
|
||||||
|
|
||||||
|
echo "Finished transfering data"
|
||||||
|
Loading…
Reference in New Issue
Block a user