[mythtv-users] find_orphans deleted everything!
Jim Abernathy
jfabernathy at gmail.com
Fri Aug 7 10:21:37 UTC 2020
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. 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.
>>> 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
>>> 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 is not to be trusted.
I don't imagine that I have a problem now and I'll be careful moving
forward.
Jim A
More information about the mythtv-users
mailing list