[mythtv-users] (Myth) Archive to hard disk

Chris Pinkham cpinkham at bc2va.org
Wed Jun 27 05:35:30 UTC 2007

* On Tue Jun 26, 2007 at 04:33:42PM -0600, Brian Wood wrote:
> The script is pretty self-explanatory, well written and commented. I
> can't recall the author, but my thanks to him again.

Surely you jest! :)

Lines like the following are attrocious:

   my( $freeSpace ) = `df -Pm $dir | grep -v Available | awk '{print \$4}'`;

   my( $cmd ) = sprintf( "mv %s %s && ln -s %s %s", $old, $new, $new, $old );
   return (system( $cmd ) == 0);

I can say all this because I wrote myth_archive_job.pl.  It was
hacked together in a few minutes after I ran out of disk space on
my main recording drive.  This was long before I created Storage
Groups which are the proper solution. :)

That's also why I put comments in the script like this:

   # don't like doing this this way, but this is an example script that
   # people can enhance if they want

Chris (who should put a big warning in myth_archive_job.pl to refer people
to Storage Groups instead now that they are available in SVN head) :)

More information about the mythtv-users mailing list