I have a ubuntu server running Serviio as a DLNA media server.
pretty much the only other thing the server is doing is checking for new media on a remote server. I am running this script every minute with cron.
#!/bin/bash
DestDir='/home/vince/media'
lockfile='/home/vince/cron/sync.lock'
if [ ! -e $lockfile ]; then
trap "rm -f $lockfile; exit" INT TERM EXIT
touch $lockfile
nice -n 20 ionice -c 3 rsync -axvmP --rsh="ssh -c arcfour" --progress --delete --include='*/' --include='*.mkv' --include='*.mp4' --include='*.avi' --exclude='*' --log-file='/home/vince/log/sync' ***@***:/home/vince/media/ "$DestDir"
rm $lockfile
trap - INT TERM EXIT
[ $? -eq 0 ] && logger 'RSYNC sync completed successfully' || logger 'RSYNC sync Failed'
else
echo "script already running"
fi
you see i have used a weaker cipher, nice and ionice but if rsync finds a nice 6GB file for example, and i am streaming media at the time it will cause the playback to buffer and jump.
Would it help if i moved this script to the remote server and pushed the data out instead of pulling it? or does it make no diff?
any other suggestions?