[mythtv-users] Sync 2 remote backends over VPN

robbinsck1 at gmail.com robbinsck1 at gmail.com
Sun Sep 14 02:21:53 UTC 2008


Don't know the the syntaxes off the top of my head, but could have a 
bash script with the following operations:

(this isn't the right command structure, just trying to illustrate the 
concept.)

#output show and sql to tmp directory
nuvexport SomeTVShow.mpg
#copy the show and sql to destination system
scp /tmp/SomeTVshow* account at 192.168.2.1:/storage
#create a trigger file
touch /tmp/sometvshow.start
scp /tmp/sometvshow.start account at 192.168.2.1:/storage

Then on destination system have a cron job that checks the storage 
directory for files with the extension of ".start" and when it sees a 
file with that name it processes the .mpg and .sql files.

#!/bin/bash
FILES=`ls /storage`
for file in $FILES
do
         if [ ! -e "$file" ]
                 NAME=`echo "$file" | cut -d'.' -f1`
                 nuvexport import "$NAME.SQL" "$NAME.mpg";
                 continue;
         then
                 continue;
         fi
done
exit 0


Something like this will work (not correct nuvexport syntax, you will 
need to look that up.)


This will be fun to dissect, thanks for the input. I need a chance to look at this closely. 



More information about the mythtv-users mailing list