[mythtv-users] find_orphans deleted everything!
Jim Abernathy
jfabernathy at gmail.com
Fri Aug 7 11:04:00 UTC 2020
On 8/7/20 6:34 AM, Mark Perkins wrote:
>
> ------------------------------------------------------------------------
> *From:* Jim Abernathy <jfabernathy at gmail.com>
> *Sent:* Friday, 7 August 2020 7:52 pm
> *To:* mythtv-users at mythtv.org
> *Subject:* Re: [mythtv-users] find_orphans deleted everything!
>
>
> On 8/7/20 1:41 AM, Bill Meek wrote:
> > On 8/6/20 1:24 PM, Jim Abernathy wrote:
> >>
> >> On 8/4/20 11:38 AM, James Abernathy wrote:
> >>>
> >>>
> >>> On Tue, Aug 4, 2020 at 11:18 AM Bill Meek <keemllib at gmail.com
> >>> <mailto:keemllib at gmail.com>> wrote:
> >>>
> >>> On 8/4/20 7:20 AM, James Abernathy wrote:
> >>> > This is strange. I've used the find_orphans script for
> years to
> >>> find
> >>> > problems and fix them; particularly after restoring a
> database.
> >>> >
> >>> > So after creating a new system with a new database but the
> >>> same old
> >>> > recordings hard drive, I ran it looking for issues. It found
> >>> about 20 and
> >>> > I chose to delete the problems. It deleted everything
> including a
> >>> > recording that was happening at the time. Many of these
> were
> >>> Live TV
> >>> > partial recordings and nothing of significance was lost.
> >>> However, it makes
> >>> > me wonder about find_orphan.py <http://orphan.py>. I
> have the version that is for
> >>> v31+.
> >>> >
> >>> > Thoughts?
> >>> >
> >>> > JIm A
> >>>
> >>> I'm confused about the "nothing of significance was lost"
> >>> comment and the Subject: line.
> >>>
> >>> By everything, do you mean it deleted all of the recordings
> >>> on the "old recordings drive"?
> >>>
> >>> Did the initial output list the recordings that it planned
> >>> to delete?
> >>>
> >>> -- Bill
> >>>
> >>>
> >>> Sorry I was not clear. Since I rebuilt the system I have
> recorded
> >>> nothing of interest, just keeping everything working. So
> losing all
> >>> the recordings since the rebuild is not significant . So if I
> check
> >>> my storage groups directories "defaults" and "Livetv" I see only
> >>> files recorded since I did the destructed find_orphans.py
> <http://orphans.py>.
> >>> So now I should have no orphans. Only 2 recordings and 1
> >>> livetv file. But if you look at the console below you'll see the
> >>> problem.
> >>>
> >>> jim at mythbuntu:/mnt/md1$ ls recorded-tv2/
> >>> 10501_20200804123700.ts 11701_20200804122800.ts
> >>> 10501_20200804123700.ts.png 11701_20200804122800.ts.png
> >>> jim at mythbuntu:/mnt/md1$ ls livetv2/
> >>> 11101_20200804123728.ts
> >>> jim at mythbuntu:/mnt/md1$ cd
> >>> jim at mythbuntu:~$ ./find_orphans.py <http://orphans.py>
> >>> Recordings with missing files
> >>> mythbuntu: CBS This Morning 11701_20200804122800.ts
> >>> mythbuntu: Good Morning America 11101_20200804123728.ts
> >>> mythbuntu: Today 10501_20200804123700.ts
> >>> Count: 3
> >>> Please select from the following
> >>> 1. Delete orphaned recording entries
> >>> 2. Refresh list
> >>> >
> >>
> >> Bill,
> >>
> >> Did you see what I was referring to?
> >
> > Yes, and I don't have an answer. May be the use of BackendServerIP
> > that doesn't
> > exist on a fresh install. Rather, MasterServerIP. Try changing both
> > BackendServerIP
> > SQL to use the MasterServerIP.
> >
> > If so, the SQL may need to be
> >
> > WHERE hostname=%s AND value IN (%s, %s)""",
> > (host, 'BackendServerIP', 'MasterServerIP')
> >
> > or something like that. Don't have time to work on it now.
> > Similar for the 2nd query (the else case).
>
> I played with the script a little but I have two handicaps, (1.) I
> don't
> know mysql and (2.) I don't know python3.
>
> So I'm not going to be any help here. So basically, I'm making a
> note
> on my system that find_orphan.py <http://orphan.py> is not to be
> trusted.
>
> I don't imagine that I have a problem now and I'll be careful moving
> forward.
>
> Jim A
>
>
>
>
> Does the user running the script have the same permissions as the user
> running the backend (alternatively try running script as same user as
> backend). Are you running script remotely from storage groups / backend?
>
As a test I replaced the find_orphan.py on both the backend and a
frontend with the v31 version from the
wiki.https://www.mythtv.org/wiki/Find_orphans.py
Then I ran it on the backend console as me, 'jim', and as 'mythtv'. No
change; still listed all my current recordings as "Recordings with
missing files".
Then I ran it on a frontend that can run mythfrontend okay and the
results were the same. The recordings with missing files that were
listed were the only 3 on the system at the time and one was being
recording at that instant.
Jim A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200807/0b5688d6/attachment.htm>
More information about the mythtv-users
mailing list