Mailing List Archive

reconfigure to single FE/BE with Json
Experimentally, I tried using a RPi4 as a master BE with EIT program data,
on 24/7 to get the best data possible. That didn't work so well so, as the
subject indicates, I want my previous setup back. I renewed my SD
subscription and started with the "XMLTV - MythTV Official" wiki. I did the
xmltv install, but get nothing when I run "mythtv-setup" as mythtv. If I
turn the RPi off I can't connect to the database. Do I need to restore a
database to the Lenovo in order to proceed with the wiki?
TIA Daryl
Re: reconfigure to single FE/BE with Json [ In reply to ]
These attempts are with the Lenovo set as Master and the RPi powered down:

daryl@trieli:~$ ./mythconverg_restore.pl --directory /home/daryl --filename
mythconverg-1376-20230923073802.sql.gz --verbose

Configuring environment:
- username: daryl
- HOME: /home/daryl
- MYTHCONFDIR: /home/daryl/.mythtv

Parsing configuration files:
- checking: /home/daryl/.mythtv/config.xml
parsing: /home/daryl/.mythtv/config.xml
- checking: /home/daryl/.mythtv/backuprc

Applying command-line arguments.

Checking configuration.

Database Information:
DBHostName: 192.168.0.198
DBPort: 3306
DBUserName: mythtv
DBPassword: XXX
DBName: mythconverg
DBSchemaVer:
DBBackupDirectory: /home/daryl
DBBackupFilename: mythconverg-1376-20230923073802.sql.gz
drop_database: no
create_database: no

Executables:
mysql_client: mysql
uncompress: gzip -d

Miscellaneous:
partial_restore: no
restore_xmltvids: no
change_hostname: no

Checking database.
DBI connect('host=192.168.0.198:database=mythconverg','mythtv',...) failed:
Can't connect to MySQL server on '192.168.0.198:3306' (113) at ./
mythconverg_restore.pl line 933.

Unable to connect to database.
database: mythconverg
host: 192.168.0.198
username: mythtv
password: **********

Please check your configuration files to verify the database connection
information is correct. The files that are used to retrieve connection
information are prefixed with "parsing" in the "Parsing configuration files"
section of the --verbose output.

Also note that any [client] or [mysql] password specified in the MySQL
options
file (/etc/my.cnf or /etc/mysql/my.cnf or ~/.my.cnf) will take precedence
over
the password specified in the MythTV configuration files.

ERROR: Unable to connect to database.
daryl@trieli:~$ ./mythconverg_restore.pl --create_database --directory
/home/daryl --filename mythconverg-1376-20230923073802.sql.gz --verbose

Configuring environment:
- username: daryl
- HOME: /home/daryl
- MYTHCONFDIR: /home/daryl/.mythtv

Parsing configuration files:
- checking: /home/daryl/.mythtv/config.xml
parsing: /home/daryl/.mythtv/config.xml
- checking: /home/daryl/.mythtv/backuprc

Applying command-line arguments.

Checking configuration.

Database Information:
DBHostName: 192.168.0.198
DBPort: 3306
DBUserName: mythtv
DBPassword: XXX
DBName: mythconverg
DBSchemaVer:
DBBackupDirectory: /home/daryl
DBBackupFilename: mythconverg-1376-20230923073802.sql.gz
drop_database: no
create_database: yes

Executables:
mysql_client: mysql
uncompress: gzip -d

Miscellaneous:
partial_restore: no
restore_xmltvids: no
change_hostname: no

Checking database.
DBI connect('host=192.168.0.198:database=mythconverg','mythtv',...) failed:
Can't connect to MySQL server on '192.168.0.198:3306' (113) at ./
mythconverg_restore.pl line 933.

Preparing initial database.
DBI connect('host=192.168.0.198','mythtv',...) failed: Can't connect to
MySQL server on '192.168.0.198:3306' (113) at ./mythconverg_restore.pl line
933.

Unable to connect to database.
database: mythconverg
host: 192.168.0.198
username: mythtv
password: **********

Please check your configuration files to verify the database connection
information is correct. The files that are used to retrieve connection
information are prefixed with "parsing" in the "Parsing configuration files"
section of the --verbose output.

Also note that any [client] or [mysql] password specified in the MySQL
options
file (/etc/my.cnf or /etc/mysql/my.cnf or ~/.my.cnf) will take precedence
over
the password specified in the MythTV configuration files.

ERROR: Unable to connect to database.

On Sat, Sep 23, 2023 at 9:22?AM Daryl McDonald <darylangela@gmail.com>
wrote:

> Experimentally, I tried using a RPi4 as a master BE with EIT program data,
> on 24/7 to get the best data possible. That didn't work so well so, as the
> subject indicates, I want my previous setup back. I renewed my SD
> subscription and started with the "XMLTV - MythTV Official" wiki. I did the
> xmltv install, but get nothing when I run "mythtv-setup" as mythtv. If I
> turn the RPi off I can't connect to the database. Do I need to restore a
> database to the Lenovo in order to proceed with the wiki?
> TIA Daryl
>
Re: reconfigure to single FE/BE with Json [ In reply to ]
Hoi Daryl,

Saturday, September 23, 2023, 3:22:59 PM, you wrote:

> Experimentally, I tried using a RPi4 as a master BE with EIT
> program data, on 24/7 to get the best data possible. That didn't
> work so well so, as the subject indicates, I want my previous setup
> back. I renewed my SD subscription and started with the "XMLTV -
> MythTV Official" wiki. I did the xmltv install, but get nothing when
> I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
> connect to the database. Do I need to restore a database to the
> Lenovo in order to proceed with the wiki?
> TIA  Daryl

Am I right to assume your database is on the rpi?
The database does not have to be on the machine running the
master backend, but it MUST be up and running to use mythtv.
So, if the db is on the rpi and you want to take the rpi out of
commission, you will have to move the database and change the settings
on all back and frontends accordingly.


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
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: reconfigure to single FE/BE with Json [ In reply to ]
On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <hikavdh@gmail.com>
wrote:

> Hoi Daryl,
>
> Saturday, September 23, 2023, 3:22:59 PM, you wrote:
>
> > Experimentally, I tried using a RPi4 as a master BE with EIT
> > program data, on 24/7 to get the best data possible. That didn't
> > work so well so, as the subject indicates, I want my previous setup
> > back. I renewed my SD subscription and started with the "XMLTV -
> > MythTV Official" wiki. I did the xmltv install, but get nothing when
> > I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
> > connect to the database. Do I need to restore a database to the
> > Lenovo in order to proceed with the wiki?
> > TIA Daryl
>
> Am I right to assume your database is on the rpi?
>
Yes, it is currently the Master BE

> The database does not have to be on the machine running the
> master backend, but it MUST be up and running to use mythtv.
> So, if the db is on the rpi and you want to take the rpi out of
> commission, you will have to move the database and change the settings
> on all back and frontends accordingly.
>

The RPi is called "trieli" and the Lenovo is called "daryl".
I've created a new database backup from the RPi (host name trieli) so I'll
need to change Lenove's hostname from daryl to trieli to be able to: drop,
create, and restore this new db?

Or can I move the database from the master (RPi) to the slave (Lenovo) and
then configure the Lenovo to be the master?

TIA Daryl

>
>
>
>
Re: reconfigure to single FE/BE with Json [ In reply to ]
Hoi Daryl,

Saturday, September 23, 2023, 5:17:45 PM, you wrote:


> On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <hikavdh@gmail.com> wrote:

> Hoi Daryl,
>
> Saturday, September 23, 2023, 3:22:59 PM, you wrote:
>
>> Experimentally, I tried using a RPi4 as a master BE with EIT
>> program data, on 24/7 to get the best data possible. That didn't
>> work so well so, as the subject indicates, I want my previous setup
>> back. I renewed my SD subscription and started with the "XMLTV -
>> MythTV Official" wiki. I did the xmltv install, but get nothing when
>> I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
>> connect to the database. Do I need to restore a database to the
>> Lenovo in order to proceed with the wiki?
>> TIA  Daryl
>
> Am I right to assume your database is on the rpi?


> Yes, it is currently the Master BE 
> The database does not have to be on the machine running the
> master backend, but it MUST be up and running to use mythtv.
> So, if the db is on the rpi and you want to take the rpi out of
> commission, you will have to move the database and change the settings
> on all back and frontends accordingly.


>  
> The RPi is called "trieli" and the Lenovo is called "daryl".
> I've created a new database backup from the RPi (host name trieli)
> so I'll need to change Lenove's hostname from daryl to trieli to be
> able to: drop, create, and restore this new db?


> Or can I move the database from the master (RPi) to the slave
> (Lenovo) and then configure the Lenovo to be  the master?


> TIA  Daryl 
>
Do not change hostnames. Change ~/.mythtv/config.xml on all machines
running a back or frontend for all users to point to the new location
ip address for the database.
Then restore your backup from the rpi on the lenovo.
After this it should work as before with the rpi still as the master
and the lenovo as the slave.
Next I think, but I have never tried it, you change the lenovo through
mythtv-setup to master. I think then the rpi will automatically
degrade to slave. But if you want to keep using it as slave you best
check.



Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
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: reconfigure to single FE/BE with Json [ In reply to ]
On Sat, Sep 23, 2023 at 11:37?AM Hika van den Hoven <hikavdh@gmail.com>
wrote:

> Hoi Daryl,
>
> Saturday, September 23, 2023, 5:17:45 PM, you wrote:
>
>
> > On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <hikavdh@gmail.com>
> wrote:
>
> > Hoi Daryl,
> >
> > Saturday, September 23, 2023, 3:22:59 PM, you wrote:
> >
> >> Experimentally, I tried using a RPi4 as a master BE with EIT
> >> program data, on 24/7 to get the best data possible. That didn't
> >> work so well so, as the subject indicates, I want my previous setup
> >> back. I renewed my SD subscription and started with the "XMLTV -
> >> MythTV Official" wiki. I did the xmltv install, but get nothing when
> >> I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
> >> connect to the database. Do I need to restore a database to the
> >> Lenovo in order to proceed with the wiki?
> >> TIA Daryl
> >
> > Am I right to assume your database is on the rpi?
>
>
> > Yes, it is currently the Master BE
> > The database does not have to be on the machine running the
> > master backend, but it MUST be up and running to use mythtv.
> > So, if the db is on the rpi and you want to take the rpi out of
> > commission, you will have to move the database and change the settings
> > on all back and frontends accordingly.
>
>
> >
> > The RPi is called "trieli" and the Lenovo is called "daryl".
> > I've created a new database backup from the RPi (host name trieli)
> > so I'll need to change Lenove's hostname from daryl to trieli to be
> > able to: drop, create, and restore this new db?
>
>
> > Or can I move the database from the master (RPi) to the slave
> > (Lenovo) and then configure the Lenovo to be the master?
>
>
> > TIA Daryl
> >
> Do not change hostnames. Change ~/.mythtv/config.xml on all machines
> running a back or frontend for all users to point to the new location
> ip address for the database.
> Then restore your backup from the rpi on the lenovo.
>

IIRC restoring a database with a hostname trieli will fail to restore on a
machine with a hostname daryl?


> After this it should work as before with the rpi still as the master
> and the lenovo as the slave.
> Next I think, but I have never tried it, you change the lenovo through
> mythtv-setup to master. I think then the rpi will automatically
> degrade to slave. But if you want to keep using it as slave you best
> check.
>
Yes, I've made these changes, back and forth making either Master or Slave.
I want to retire the RPi.

>
>
>
> Tot mails,
> Hika mailto:hikavdh@gmail.com
>
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>
> De lerende Mens
>
> _______________________________________________
> 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: reconfigure to single FE/BE with Json [ In reply to ]
On Sat, 23 Sep 2023 11:17:45 -0400, you wrote:

>On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <hikavdh@gmail.com>
>wrote:
>
>> Hoi Daryl,
>>
>> Saturday, September 23, 2023, 3:22:59 PM, you wrote:
>>
>> > Experimentally, I tried using a RPi4 as a master BE with EIT
>> > program data, on 24/7 to get the best data possible. That didn't
>> > work so well so, as the subject indicates, I want my previous setup
>> > back. I renewed my SD subscription and started with the "XMLTV -
>> > MythTV Official" wiki. I did the xmltv install, but get nothing when
>> > I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
>> > connect to the database. Do I need to restore a database to the
>> > Lenovo in order to proceed with the wiki?
>> > TIA Daryl
>>
>> Am I right to assume your database is on the rpi?
>>
>Yes, it is currently the Master BE
>
>> The database does not have to be on the machine running the
>> master backend, but it MUST be up and running to use mythtv.
>> So, if the db is on the rpi and you want to take the rpi out of
>> commission, you will have to move the database and change the settings
>> on all back and frontends accordingly.
>>
>
>The RPi is called "trieli" and the Lenovo is called "daryl".
>I've created a new database backup from the RPi (host name trieli) so I'll
>need to change Lenove's hostname from daryl to trieli to be able to: drop,
>create, and restore this new db?
>
>Or can I move the database from the master (RPi) to the slave (Lenovo) and
>then configure the Lenovo to be the master?
>
>TIA Daryl

The mythconverg_restore.pl program has an option to change the
hostname in the database - use the --help option to see it. So you
can restore a database on a machine with a different hostname, then
use that command to change the hostname in the database to match the
machine's hostname.
_______________________________________________
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: reconfigure to single FE/BE with Json [ In reply to ]
On Sat, Sep 23, 2023 at 12:24?PM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Sat, 23 Sep 2023 11:17:45 -0400, you wrote:
>
> >On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <hikavdh@gmail.com>
> >wrote:
> >
> >> Hoi Daryl,
> >>
> >> Saturday, September 23, 2023, 3:22:59 PM, you wrote:
> >>
> >> > Experimentally, I tried using a RPi4 as a master BE with EIT
> >> > program data, on 24/7 to get the best data possible. That didn't
> >> > work so well so, as the subject indicates, I want my previous setup
> >> > back. I renewed my SD subscription and started with the "XMLTV -
> >> > MythTV Official" wiki. I did the xmltv install, but get nothing when
> >> > I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
> >> > connect to the database. Do I need to restore a database to the
> >> > Lenovo in order to proceed with the wiki?
> >> > TIA Daryl
> >>
> >> Am I right to assume your database is on the rpi?
> >>
> >Yes, it is currently the Master BE
> >
> >> The database does not have to be on the machine running the
> >> master backend, but it MUST be up and running to use mythtv.
> >> So, if the db is on the rpi and you want to take the rpi out of
> >> commission, you will have to move the database and change the settings
> >> on all back and frontends accordingly.
> >>
> >
> >The RPi is called "trieli" and the Lenovo is called "daryl".
> >I've created a new database backup from the RPi (host name trieli) so I'll
> >need to change Lenove's hostname from daryl to trieli to be able to: drop,
> >create, and restore this new db?
> >
> >Or can I move the database from the master (RPi) to the slave (Lenovo) and
> >then configure the Lenovo to be the master?
> >
> >TIA Daryl
>
> The mythconverg_restore.pl program has an option to change the
> hostname in the database - use the --help option to see it. So you
> can restore a database on a machine with a different hostname, then
> use that command to change the hostname in the database to match the
> machine's hostname.
>
So, to make sure I understand this. restoring the RPi's database backup
onto the Lenovo, WILL restore and leave me with a mis-match of hostnames:
database to machine (Lenovo) which can be corrected / matched by using the
command in the mythconverg_restore.pl --help. Then off to the XMLTV wiki?
Thanks again! Daryl
Re: reconfigure to single FE/BE with Json [ In reply to ]
On Sat, 23 Sep 2023 12:42:13 -0400, you wrote:

>On Sat, Sep 23, 2023 at 12:24?PM Stephen Worthington <
>stephen_agent@jsw.gen.nz> wrote:
>
>> On Sat, 23 Sep 2023 11:17:45 -0400, you wrote:
>>
>> >On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <hikavdh@gmail.com>
>> >wrote:
>> >
>> >> Hoi Daryl,
>> >>
>> >> Saturday, September 23, 2023, 3:22:59 PM, you wrote:
>> >>
>> >> > Experimentally, I tried using a RPi4 as a master BE with EIT
>> >> > program data, on 24/7 to get the best data possible. That didn't
>> >> > work so well so, as the subject indicates, I want my previous setup
>> >> > back. I renewed my SD subscription and started with the "XMLTV -
>> >> > MythTV Official" wiki. I did the xmltv install, but get nothing when
>> >> > I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
>> >> > connect to the database. Do I need to restore a database to the
>> >> > Lenovo in order to proceed with the wiki?
>> >> > TIA Daryl
>> >>
>> >> Am I right to assume your database is on the rpi?
>> >>
>> >Yes, it is currently the Master BE
>> >
>> >> The database does not have to be on the machine running the
>> >> master backend, but it MUST be up and running to use mythtv.
>> >> So, if the db is on the rpi and you want to take the rpi out of
>> >> commission, you will have to move the database and change the settings
>> >> on all back and frontends accordingly.
>> >>
>> >
>> >The RPi is called "trieli" and the Lenovo is called "daryl".
>> >I've created a new database backup from the RPi (host name trieli) so I'll
>> >need to change Lenove's hostname from daryl to trieli to be able to: drop,
>> >create, and restore this new db?
>> >
>> >Or can I move the database from the master (RPi) to the slave (Lenovo) and
>> >then configure the Lenovo to be the master?
>> >
>> >TIA Daryl
>>
>> The mythconverg_restore.pl program has an option to change the
>> hostname in the database - use the --help option to see it. So you
>> can restore a database on a machine with a different hostname, then
>> use that command to change the hostname in the database to match the
>> machine's hostname.
>>
>So, to make sure I understand this. restoring the RPi's database backup
>onto the Lenovo, WILL restore and leave me with a mis-match of hostnames:
>database to machine (Lenovo) which can be corrected / matched by using the
>command in the mythconverg_restore.pl --help. Then off to the XMLTV wiki?
>Thanks again! Daryl

Yes.
_______________________________________________
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: reconfigure to single FE/BE with Json [ In reply to ]
With both backends running the db drop, create, and restore went ahead
fine, then when the RPi is shutdown the Lenovo can't connect to the
database. With only the Lenovo running the restore (etal) fails because it
can"t connect to the database. Is there a way to move the database from the
RPi to the Lenovo? The wiki at "
https://www.mythtv.org/wiki/Backend_migration" seems not to apply because
this would be retiring a master and promoting a slave to master,rather than
bringing a database from an unrelated system.

Maybe just this bit below? : (storage directories are setup on both boxes
and recordings are prioritized to occur on the Lenovo)

mysql -umythtv -p mythconverg -e "UPDATE recorded SET hostname =
'new_daryl' WHERE hostname = 'old_trieli';"

On Sat, Sep 23, 2023 at 12:45?PM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Sat, 23 Sep 2023 12:42:13 -0400, you wrote:
>
> >On Sat, Sep 23, 2023 at 12:24?PM Stephen Worthington <
> >stephen_agent@jsw.gen.nz> wrote:
> >
> >> On Sat, 23 Sep 2023 11:17:45 -0400, you wrote:
> >>
> >> >On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <hikavdh@gmail.com
> >
> >> >wrote:
> >> >
> >> >> Hoi Daryl,
> >> >>
> >> >> Saturday, September 23, 2023, 3:22:59 PM, you wrote:
> >> >>
> >> >> > Experimentally, I tried using a RPi4 as a master BE with EIT
> >> >> > program data, on 24/7 to get the best data possible. That didn't
> >> >> > work so well so, as the subject indicates, I want my previous setup
> >> >> > back. I renewed my SD subscription and started with the "XMLTV -
> >> >> > MythTV Official" wiki. I did the xmltv install, but get nothing
> when
> >> >> > I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
> >> >> > connect to the database. Do I need to restore a database to the
> >> >> > Lenovo in order to proceed with the wiki?
> >> >> > TIA Daryl
> >> >>
> >> >> Am I right to assume your database is on the rpi?
> >> >>
> >> >Yes, it is currently the Master BE
> >> >
> >> >> The database does not have to be on the machine running the
> >> >> master backend, but it MUST be up and running to use mythtv.
> >> >> So, if the db is on the rpi and you want to take the rpi out of
> >> >> commission, you will have to move the database and change the
> settings
> >> >> on all back and frontends accordingly.
> >> >>
> >> >
> >> >The RPi is called "trieli" and the Lenovo is called "daryl".
> >> >I've created a new database backup from the RPi (host name trieli) so
> I'll
> >> >need to change Lenove's hostname from daryl to trieli to be able to:
> drop,
> >> >create, and restore this new db?
> >> >
> >> >Or can I move the database from the master (RPi) to the slave (Lenovo)
> and
> >> >then configure the Lenovo to be the master?
> >> >
> >> >TIA Daryl
> >>
> >> The mythconverg_restore.pl program has an option to change the
> >> hostname in the database - use the --help option to see it. So you
> >> can restore a database on a machine with a different hostname, then
> >> use that command to change the hostname in the database to match the
> >> machine's hostname.
> >>
> >So, to make sure I understand this. restoring the RPi's database backup
> >onto the Lenovo, WILL restore and leave me with a mis-match of hostnames:
> >database to machine (Lenovo) which can be corrected / matched by using the
> >command in the mythconverg_restore.pl --help. Then off to the XMLTV wiki?
> >Thanks again! Daryl
>
> Yes.
> _______________________________________________
> 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: reconfigure to single FE/BE with Json [ In reply to ]
On Tue, 26 Sep 2023 08:43:47 -0400, you wrote:

>With both backends running the db drop, create, and restore went ahead
>fine, then when the RPi is shutdown the Lenovo can't connect to the
>database. With only the Lenovo running the restore (etal) fails because it
>can"t connect to the database. Is there a way to move the database from the
>RPi to the Lenovo? The wiki at "
>https://www.mythtv.org/wiki/Backend_migration" seems not to apply because
>this would be retiring a master and promoting a slave to master,rather than
>bringing a database from an unrelated system.
>
>Maybe just this bit below? : (storage directories are setup on both boxes
>and recordings are prioritized to occur on the Lenovo)
>
> mysql -umythtv -p mythconverg -e "UPDATE recorded SET hostname =
>'new_daryl' WHERE hostname = 'old_trieli';"

Once you restore the database and change its hostname settings, you
probably need to alter the IP addresses for the backend and database
location that are stored in the database. Run mythtv-setup and see if
the addresses are still set to point to the old backend. And the
frontends will need their config.xml files changed to connect to the
correct backend.

The hostname in the recorded table just tells you where the recording
was made, not where it is now able to be found. If the recording file
can be found in any storage group on the current backend (or its
slaves), then it can be played regardless of the hostname value. I
have recordings on my main MythTV box made on my backup box and my
mother's MythTV box, with those hostnames. They were copied to my
main MythTV box using mythexport/mythimport and they play just fine.
_______________________________________________
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: reconfigure to single FE/BE with Json [ In reply to ]
On 26/09/2023 13:43, Daryl McDonald wrote:
> On Sat, Sep 23, 2023 at 12:45?PM Stephen Worthington <
> stephen_agent@jsw.gen.nz> wrote:
>
>> On Sat, 23 Sep 2023 12:42:13 -0400, you wrote:
>>
>>> On Sat, Sep 23, 2023 at 12:24?PM Stephen Worthington <
>>> stephen_agent@jsw.gen.nz> wrote:
>>>
>>>> On Sat, 23 Sep 2023 11:17:45 -0400, you wrote:
>>>>
>>>>> On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <hikavdh@gmail.com
>>>
>>>>> wrote:
>>>>>
>>>>>> Hoi Daryl,
>>>>>>
>>>>>> Saturday, September 23, 2023, 3:22:59 PM, you wrote:
>>>>>>
>>>>>>> Experimentally, I tried using a RPi4 as a master BE with EIT
>>>>>>> program data, on 24/7 to get the best data possible. That didn't
>>>>>>> work so well so, as the subject indicates, I want my previous setup
>>>>>>> back. I renewed my SD subscription and started with the "XMLTV -
>>>>>>> MythTV Official" wiki. I did the xmltv install, but get nothing
>> when
>>>>>>> I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
>>>>>>> connect to the database. Do I need to restore a database to the
>>>>>>> Lenovo in order to proceed with the wiki?
>>>>>>> TIA Daryl
>>>>>>
>>>>>> Am I right to assume your database is on the rpi?
>>>>>>
>>>>> Yes, it is currently the Master BE
>>>>>
>>>>>> The database does not have to be on the machine running the
>>>>>> master backend, but it MUST be up and running to use mythtv.
>>>>>> So, if the db is on the rpi and you want to take the rpi out of
>>>>>> commission, you will have to move the database and change the
>> settings
>>>>>> on all back and frontends accordingly.
>>>>>>
>>>>>
>>>>> The RPi is called "trieli" and the Lenovo is called "daryl".
>>>>> I've created a new database backup from the RPi (host name trieli) so
>> I'll
>>>>> need to change Lenove's hostname from daryl to trieli to be able to:
>> drop,
>>>>> create, and restore this new db?
>>>>>
>>>>> Or can I move the database from the master (RPi) to the slave (Lenovo)
>> and
>>>>> then configure the Lenovo to be the master?
>>>>>
>>>>> TIA Daryl
>>>>
>>>> The mythconverg_restore.pl program has an option to change the
>>>> hostname in the database - use the --help option to see it. So you
>>>> can restore a database on a machine with a different hostname, then
>>>> use that command to change the hostname in the database to match the
>>>> machine's hostname.
>>>>
>>> So, to make sure I understand this. restoring the RPi's database backup
>>> onto the Lenovo, WILL restore and leave me with a mis-match of hostnames:
>>> database to machine (Lenovo) which can be corrected / matched by using the
>>> command in the mythconverg_restore.pl --help. Then off to the XMLTV wiki?
>>> Thanks again! Daryl
>>
>> Yes.
> With both backends running the db drop, create, and restore went ahead
> fine, then when the RPi is shutdown the Lenovo can't connect to the
> database. With only the Lenovo running the restore (etal) fails because it
> can"t connect to the database. Is there a way to move the database from the
> RPi to the Lenovo? The wiki at "
> https://www.mythtv.org/wiki/Backend_migration" seems not to apply because
> this would be retiring a master and promoting a slave to master,rather than
> bringing a database from an unrelated system.
>
> Maybe just this bit below? : (storage directories are setup on both boxes
> and recordings are prioritized to occur on the Lenovo)
>
> mysql -umythtv -p mythconverg -e "UPDATE recorded SET hostname =
> 'new_daryl' WHERE hostname = 'old_trieli';"
>
The only way the Lenovo backend restore could be failing to find the database is if the database
credentials still point to the RPi (or are wrong, eg have a typo).

The restore script uses a config file called backuprc which should be either in ~/.mythtv or
/etc/mythtv.

Have a look at those and make sure that they point to the Lenovo and give the correct password.

It occurs to me that, if the hostname is wrong, you could still be restoring to the RPi! Once you
have backed up the RPi database, turn off the RPI and leave it off. Having two masters on the same
network can only lead to conflict.

--

Mike Perkins


_______________________________________________
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: reconfigure to single FE/BE with Json [ In reply to ]
All is well now, slightly unconventionally, a previous iteration of Ubuntu
on this dual boot OS drive restored and renamed just fine. json setup went
well too. Thanks to all contributors. Daryl

On Tue, Sep 26, 2023 at 11:14?AM Mike Perkins <mikep@randomtraveller.org.uk>
wrote:

> On 26/09/2023 13:43, Daryl McDonald wrote:
> > On Sat, Sep 23, 2023 at 12:45?PM Stephen Worthington <
> > stephen_agent@jsw.gen.nz> wrote:
> >
> >> On Sat, 23 Sep 2023 12:42:13 -0400, you wrote:
> >>
> >>> On Sat, Sep 23, 2023 at 12:24?PM Stephen Worthington <
> >>> stephen_agent@jsw.gen.nz> wrote:
> >>>
> >>>> On Sat, 23 Sep 2023 11:17:45 -0400, you wrote:
> >>>>
> >>>>> On Sat, Sep 23, 2023 at 11:04?AM Hika van den Hoven <
> hikavdh@gmail.com
> >>>
> >>>>> wrote:
> >>>>>
> >>>>>> Hoi Daryl,
> >>>>>>
> >>>>>> Saturday, September 23, 2023, 3:22:59 PM, you wrote:
> >>>>>>
> >>>>>>> Experimentally, I tried using a RPi4 as a master BE with EIT
> >>>>>>> program data, on 24/7 to get the best data possible. That didn't
> >>>>>>> work so well so, as the subject indicates, I want my previous setup
> >>>>>>> back. I renewed my SD subscription and started with the "XMLTV -
> >>>>>>> MythTV Official" wiki. I did the xmltv install, but get nothing
> >> when
> >>>>>>> I run "mythtv-setup" as mythtv. If I turn the RPi off I can't
> >>>>>>> connect to the database. Do I need to restore a database to the
> >>>>>>> Lenovo in order to proceed with the wiki?
> >>>>>>> TIA Daryl
> >>>>>>
> >>>>>> Am I right to assume your database is on the rpi?
> >>>>>>
> >>>>> Yes, it is currently the Master BE
> >>>>>
> >>>>>> The database does not have to be on the machine running the
> >>>>>> master backend, but it MUST be up and running to use mythtv.
> >>>>>> So, if the db is on the rpi and you want to take the rpi out of
> >>>>>> commission, you will have to move the database and change the
> >> settings
> >>>>>> on all back and frontends accordingly.
> >>>>>>
> >>>>>
> >>>>> The RPi is called "trieli" and the Lenovo is called "daryl".
> >>>>> I've created a new database backup from the RPi (host name trieli) so
> >> I'll
> >>>>> need to change Lenove's hostname from daryl to trieli to be able to:
> >> drop,
> >>>>> create, and restore this new db?
> >>>>>
> >>>>> Or can I move the database from the master (RPi) to the slave
> (Lenovo)
> >> and
> >>>>> then configure the Lenovo to be the master?
> >>>>>
> >>>>> TIA Daryl
> >>>>
> >>>> The mythconverg_restore.pl program has an option to change the
> >>>> hostname in the database - use the --help option to see it. So you
> >>>> can restore a database on a machine with a different hostname, then
> >>>> use that command to change the hostname in the database to match the
> >>>> machine's hostname.
> >>>>
> >>> So, to make sure I understand this. restoring the RPi's database backup
> >>> onto the Lenovo, WILL restore and leave me with a mis-match of
> hostnames:
> >>> database to machine (Lenovo) which can be corrected / matched by using
> the
> >>> command in the mythconverg_restore.pl --help. Then off to the XMLTV
> wiki?
> >>> Thanks again! Daryl
> >>
> >> Yes.
> > With both backends running the db drop, create, and restore went ahead
> > fine, then when the RPi is shutdown the Lenovo can't connect to the
> > database. With only the Lenovo running the restore (etal) fails because
> it
> > can"t connect to the database. Is there a way to move the database from
> the
> > RPi to the Lenovo? The wiki at "
> > https://www.mythtv.org/wiki/Backend_migration" seems not to apply
> because
> > this would be retiring a master and promoting a slave to master,rather
> than
> > bringing a database from an unrelated system.
> >
> > Maybe just this bit below? : (storage directories are setup on both boxes
> > and recordings are prioritized to occur on the Lenovo)
> >
> > mysql -umythtv -p mythconverg -e "UPDATE recorded SET hostname =
> > 'new_daryl' WHERE hostname = 'old_trieli';"
> >
> The only way the Lenovo backend restore could be failing to find the
> database is if the database
> credentials still point to the RPi (or are wrong, eg have a typo).
>
> The restore script uses a config file called backuprc which should be
> either in ~/.mythtv or
> /etc/mythtv.
>
> Have a look at those and make sure that they point to the Lenovo and give
> the correct password.
>
> It occurs to me that, if the hostname is wrong, you could still be
> restoring to the RPi! Once you
> have backed up the RPi database, turn off the RPI and leave it off. Having
> two masters on the same
> network can only lead to conflict.
>
> --
>
> Mike Perkins
>
>
> _______________________________________________
> 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
>