[mythtv-users] Want to automatically backup my music directory

Gabe Rubin gaberubin at gmail.com
Tue Dec 28 18:24:06 UTC 2010

Hi list,

I have all of my music on my windows box which I mount on my mythbox
using samba.  I have decided that I want to shut down the windows box
when it is not in use.  I have plenty of space on my mythbox, so I
figure I can just backup all my music to the mythbox in its own
directory so that myth can play the music when the windows box is not
on (also allowing me to have a backup in case anything goes wrong).

I am guessing I want use rsync, but I am not too familiar with how to
do it.  Can anyone give me guidance on how to write a script that I
can call from a cron job that will first check to see if the windows
share is actually accessible (i am thinking the script would do an ls
of the mounted directory and return a false if the directory is empty
and a true if the directory contains files) and if the script returns
a true, then use rsync or some other tool to backup the mounted
directory (/win/music) to a specified directory (/music)?

Appreciate any help I can get.

More information about the mythtv-users mailing list