Mailing List Archive

find_orphans deleted everything!
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
Re: find_orphans deleted everything! [ In reply to ]
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
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: find_orphans deleted everything! [ In reply to ]
On Tue, Aug 4, 2020 at 11:18 AM Bill Meek <keemllib@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@mythbuntu:/mnt/md1$ ls recorded-tv2/
10501_20200804123700.ts 11701_20200804122800.ts
10501_20200804123700.ts.png 11701_20200804122800.ts.png
jim@mythbuntu:/mnt/md1$ ls livetv2/
11101_20200804123728.ts
jim@mythbuntu:/mnt/md1$ cd
jim@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
>
Re: find_orphans deleted everything! [ In reply to ]
On 8/4/20 11:38 AM, James Abernathy wrote:
>
>
> On Tue, Aug 4, 2020 at 11:18 AM Bill Meek <keemllib@gmail.com
> <mailto:keemllib@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@mythbuntu:/mnt/md1$ ls recorded-tv2/
> 10501_20200804123700.ts      11701_20200804122800.ts
> 10501_20200804123700.ts.png  11701_20200804122800.ts.png
> jim@mythbuntu:/mnt/md1$ ls livetv2/
> 11101_20200804123728.ts
> jim@mythbuntu:/mnt/md1$ cd
> jim@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?

I ran the script again today, but exited and it showed the only 2
recordings on my system. Both made this morning and should not be orphans.

-----------

jim@mythbuntu:~$ ./find_orphans.py
Recordings with missing files
  mythbuntu: Ask This Old House - Backsplash; Rainwater
Feature              10404_20200806103000.ts
  mythbuntu: CBS This Morning 11701_20200806110000.ts
Count:           2
Please select from the following
 1. Delete orphaned recording entries
 2. Refresh list

Jim A
Re: find_orphans deleted everything! [ In reply to ]
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@gmail.com <mailto:keemllib@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@mythbuntu:/mnt/md1$ ls recorded-tv2/
>> 10501_20200804123700.ts      11701_20200804122800.ts
>> 10501_20200804123700.ts.png  11701_20200804122800.ts.png
>> jim@mythbuntu:/mnt/md1$ ls livetv2/
>> 11101_20200804123728.ts
>> jim@mythbuntu:/mnt/md1$ cd
>> jim@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 ran the script again today, but exited and it showed the only 2 recordings on my system. Both made this morning and should not be orphans.
>
> -----------
>
> jim@mythbuntu:~$ ./find_orphans.py
> Recordings with missing files
>   mythbuntu: Ask This Old House - Backsplash; Rainwater Feature              10404_20200806103000.ts
>   mythbuntu: CBS This Morning 11701_20200806110000.ts
> Count:           2
> Please select from the following
>  1. Delete orphaned recording entries
>  2. Refresh list


--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: find_orphans deleted everything! [ In reply to ]
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@gmail.com
>>> <mailto:keemllib@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@mythbuntu:/mnt/md1$ ls recorded-tv2/
>>> 10501_20200804123700.ts      11701_20200804122800.ts
>>> 10501_20200804123700.ts.png  11701_20200804122800.ts.png
>>> jim@mythbuntu:/mnt/md1$ ls livetv2/
>>> 11101_20200804123728.ts
>>> jim@mythbuntu:/mnt/md1$ cd
>>> jim@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



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: find_orphans deleted everything! [ In reply to ]
________________________________
From: Jim Abernathy <jfabernathy@gmail.com>
Sent: Friday, 7 August 2020 7:52 pm
To: mythtv-users@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@gmail.com
>>> <mailto:keemllib@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@mythbuntu:/mnt/md1$ ls recorded-tv2/
>>> 10501_20200804123700.ts 11701_20200804122800.ts
>>> 10501_20200804123700.ts.png 11701_20200804122800.ts.png
>>> jim@mythbuntu:/mnt/md1$ ls livetv2/
>>> 11101_20200804123728.ts
>>> jim@mythbuntu:/mnt/md1$ cd
>>> jim@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?
Re: find_orphans deleted everything! [ In reply to ]
On 8/7/20 6:34 AM, Mark Perkins wrote:
>
> ------------------------------------------------------------------------
> *From:* Jim Abernathy <jfabernathy@gmail.com>
> *Sent:* Friday, 7 August 2020 7:52 pm
> *To:* mythtv-users@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@gmail.com
> >>> <mailto:keemllib@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@mythbuntu:/mnt/md1$ ls recorded-tv2/
> >>> 10501_20200804123700.ts      11701_20200804122800.ts
> >>> 10501_20200804123700.ts.png  11701_20200804122800.ts.png
> >>> jim@mythbuntu:/mnt/md1$ ls livetv2/
> >>> 11101_20200804123728.ts
> >>> jim@mythbuntu:/mnt/md1$ cd
> >>> jim@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
Re: find_orphans deleted everything! [ In reply to ]
On 8/7/20 5:21 AM, Jim Abernathy wrote:
>
> On 8/7/20 1:41 AM, Bill Meek wrote:

...

>>
>> 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.

> 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.

Can you just edit the file and change both instances of BackendServerIP
to MasterServerIP?

If that works, I'll try to get to it later today or over the weekend.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: find_orphans deleted everything! [ In reply to ]
On 8/7/20 7:07 AM, Bill Meek wrote:
> On 8/7/20 5:21 AM, Jim Abernathy wrote:
>>
>> On 8/7/20 1:41 AM, Bill Meek wrote:
>
> ...
>
>>>
>>> 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.
>
>> 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.
>
> Can you just edit the file and change both instances of BackendServerIP
> to MasterServerIP?
>
> If that works, I'll try to get to it later today or over the weekend.
>

Ignore the above, the host is NULL for MasterServerIP.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: find_orphans deleted everything! [ In reply to ]
On 2020-08-07 8:07 a.m., Bill Meek wrote:
> On 8/7/20 5:21 AM, Jim Abernathy wrote:
>>
>> On 8/7/20 1:41 AM, Bill Meek wrote:
>
> ...
>
>>>
>>> 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.
>
>> 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.
>
> Can you just edit the file and change both instances of BackendServerIP
> to MasterServerIP?
>
> If that works, I'll try to get to it later today or over the weekend.
>
Back in May I was having some problems getting find_orphans.py to run on
a freshly installed system (although not quite the same as what's being
described here). The fix was to edit the code to change both instances
of BackendServerIP to BackendServerAddr. Ran mythutil --clearcache for
good measure as well.

Has been running well since with no further issues.

Gary
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: find_orphans deleted everything! [ In reply to ]
On Fri, 7 Aug 2020 08:27:44 -0400, you wrote:

>On 2020-08-07 8:07 a.m., Bill Meek wrote:
>> On 8/7/20 5:21 AM, Jim Abernathy wrote:
>>>
>>> On 8/7/20 1:41 AM, Bill Meek wrote:
>>
>> ...
>>
>>>>
>>>> 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.
>>
>>> 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.
>>
>> Can you just edit the file and change both instances of BackendServerIP
>> to MasterServerIP?
>>
>> If that works, I'll try to get to it later today or over the weekend.
>>
>Back in May I was having some problems getting find_orphans.py to run on
>a freshly installed system (although not quite the same as what's being
>described here). The fix was to edit the code to change both instances
>of BackendServerIP to BackendServerAddr. Ran mythutil --clearcache for
>good measure as well.
>
>Has been running well since with no further issues.
>
>Gary

I just looked at the settings table for my VirtualBox clean install of
Xubuntu 20.04 / MythTV v31. There is no setting for BackendServerIP,
but there is BackendServerAddr:

MariaDB [mythconverg]> select * from settings where value like
'%backendserver%';
+-------------------+-----------+----------------+
| value | data | hostname |
+-------------------+-----------+----------------+
| BackendServerPort | 6543 | vb-xubuntu2004 |
| BackendServerAddr | 127.0.0.1 | vb-xubuntu2004 |
+-------------------+-----------+----------------+
2 rows in set (0.000 sec)

Find_orphans.py works for me on this VM.

On my real MythTV box (Xubuntu 18.04, MythTV v30), which has been
upgraded over many years and many versions, I get this:

MariaDB [mythconverg]> select * from settings where value like
'backendserver%';
+-------------------+----------+----------+
| value | data | hostname |
+-------------------+----------+----------+
| BackendServerAddr | 10.0.2.4 | mypvr |
| BackendServerIP | 10.0.2.4 | mypvr |
| BackendServerIP6 | ::1 | mypvr |
| BackendServerPort | 6543 | mypvr |
+-------------------+----------+----------+
4 rows in set (0.00 sec)
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: find_orphans deleted everything! [ In reply to ]
On Fri, Aug 7, 2020 at 8:29 AM Gary Raposo <gary@raposo.ca> wrote:

> On 2020-08-07 8:07 a.m., Bill Meek wrote:
> > On 8/7/20 5:21 AM, Jim Abernathy wrote:
> >>
> >> On 8/7/20 1:41 AM, Bill Meek wrote:
> >
> > ...
> >
> >>>
> >>> 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.
> >
> >> 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.
> >
> > Can you just edit the file and change both instances of BackendServerIP
> > to MasterServerIP?
> >
> > If that works, I'll try to get to it later today or over the weekend.
> >
> Back in May I was having some problems getting find_orphans.py to run on
> a freshly installed system (although not quite the same as what's being
> described here). The fix was to edit the code to change both instances
> of BackendServerIP to BackendServerAddr. Ran mythutil --clearcache for
> good measure as well.
>
> Has been running well since with no further issues.
>
> Gary
>
> So I just replaced the BackendServerIP with BackendServerAddr and run the
modified find_orphan.py.
It didn't find orphans, which it shouldn't have and it listed the current
backups of the databases.

jim@mythbuntu:~$ ./find_orphan.py
Database backups
mythbuntu:
/mnt/md1/samba/public/Backups/MythTV_db_backup/mythconverg-1361-20200803053815.sql.gz
3.9MB
mythbuntu:
/mnt/md1/samba/public/Backups/MythTV_db_backup/mythconverg-1361-20200804053715.sql.gz
4.3MB
mythbuntu:
/mnt/md1/samba/public/Backups/MythTV_db_backup/mythconverg-1361-20200805053550.sql.gz
4.3MB
mythbuntu:
/mnt/md1/samba/public/Backups/MythTV_db_backup/mythconverg-1361-20200806053942.sql.gz
4.4MB
mythbuntu:
/mnt/md1/samba/public/Backups/MythTV_db_backup/mythconverg-1361-20200807053942.sql.gz
4.7MB

Total: 21.6MB
Please select from the following
1. Refresh list
>

So that fix seems to solve the problem,

Thanks. Jim A