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

John Drescher drescherjm at gmail.com
Tue Dec 28 18:29:45 UTC 2010


On Tue, Dec 28, 2010 at 1:24 PM, Gabe Rubin <gaberubin at gmail.com> wrote:
> 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)?
>

Do you ever delete music on the windows side?

if not

rsync -ax --progress sourcefolder/ destfolder/

would be enough and you would not need to check if the windows box was up.
John


More information about the mythtv-users mailing list