[mythtv-users] Some lost recording due to Seagate 500GB crash
Chuck Peters
cp at ccil.org
Mon Feb 25 16:11:53 UTC 2008
On Fri, Feb 15, 2008 at 10:25 PM, David George <david at thegeorges.us> wrote:
> On 02/15/2008 05:22 PM, Matt S. wrote:
> > On Feb 15, 2008 6:13 AM, Chuck Peters <cp at ccil.org> wrote:
> >
> >> I have lost some recordings and would like to selectively delete the
> >> database entries and files.
> >>
> > Could this be the holy grail you are looking for?
> > http://svn.mythtv.org/trac/ticket/4677
> >
>
> Wow, I just posted that and someone is referring to it already. If you
> are running SVN trunk or a recent SVN with storage groups support the
> myth.find_orphans.pl script should do what the OP wants (I haven't read
> any previous messages in this thread so someone may have already
> mentioned this). What my patch does is set the duplicate flag in
> oldrecorded to 0 if you specify the rerecord option (seems to be the
> preferred method for re-recording, if I am wrong someone correct me).
> In my case, I don't have a lot of time to watch TV lately (last couple
> of years). So I lost a lot of shows I hadn't watched yet when one of my
> drives in the storage group failed. At least I still have a bunch of
> shows from the other drives in the storage group. Hopefully they will
> be re-aired so I can record them again.
My replacement disk is supposed to arrive tomorrow and I was wondering
if anyone has used this with 0.20.2-0ubuntu10.1 and gotten it to work.
Obviously I don't have storage groups yet. All the recording that
were on the old disk were a symlink from the primary backend to
another machine via NFS done via myth_archive_job.pl.
Here is what happened on my dryrun attempt:
cp at peters:/tmp$ perl ./myth.find_orphans.pl --dryrun
--dbhost=192.168.2.1 --host=192.168.2.1 --pass=password
DBD::mysql::st execute failed: Table 'mythconverg.storagegroup'
doesn't exist at ./myth.find_orphans.pl line 277.
Could not execute () at ./myth.find_orphans.pl line 277.
The section it failed is:
272 sub dir_lookup
273 {
274 my $query = shift;
275
276 $sth = $dbh->prepare($query);
277 $sth->execute($opt_host) || die "Could not execute
($dir_query)";
278 while (my @row = $sth->fetchrow_array) {
279 $opt_dir .= "," if ($opt_dir ne "");
280 $opt_dir .= $row[0];
281 }
and the only reference to storagegroup is line 116.
115 if ($opt_dir eq "") {
116 &dir_lookup("SELECT dirname FROM storagegroup WHERE
hostname=(?)");
117 &dir_lookup("SELECT data FROM settings WHERE
value='RecordFilePrefix' AND hostname=(?)");
118
119 printf STDERR "Recording directories ($opt_host):
$opt_dir\n" if $debug;
120 }
Any suggestions?
I applied the diff to the myth.find_orphans.pl I found at:
http://svn.mythtv.org/trac/browser/branches/release-0-21-fixes/mythtv/contrib/myth.find_orphans.pl
Did I get the wrong source file?
Thanks,
Chuck
More information about the mythtv-users
mailing list