[mythtv-users] Backend DB migration--replace or just restore?

Bill Meek keemllib at gmail.com
Sat Jul 25 16:13:59 UTC 2020


On 7/25/20 10:55 AM, DryHeat122 wrote:
> 
> 
> On Sat, Jul 25, 2020 at 8:17 AM Jim Abernathy <jfabernathy at gmail.com <mailto:jfabernathy at gmail.com>> wrote:
> 
> 
>     On 7/25/20 11:09 AM, DryHeat122 wrote:
>>     I am replacing my Ubuntu 16.04 setup with a clean install of Myth on a clean install of Utuntu 20.04.  I have the old mythconverg backed
>>     up and am getting ready to restore.  The wiki backend migration page <https://www.mythtv.org/wiki/Backend_migration> says "Depending on
>>     how your distribution initialises the database upon installation of the backend, you may need to use the procedure for replacing the
>>     database by the backup <https://www.mythtv.org/wiki/Database_Backup_and_Restore#Replacing_an_existing_database>."
>>
>>     The referenced page says: " If you are replacing an existing database with a known-good backup by using a full restore--for example,
>>     because your database has been corrupted or a database schema upgrade failed or you're replacing a package-provided database with your
>>     "old" database after re-installing your distro--you will need to drop the existing database. "
>>
>>     I don't know how 20.04 initializes the DB.  I am not replacing the DB because of corruption or failed upgrade.  Do I run
>>     mythconverg_restore.pl <http://mythconverg_restore.pl> with defaults or include the drop and create arguments?  Also to be clear, I should
>>     restore the DB after installing myth but before running setup, right?
> 
>     The last time I created fresh and wanted to restore from a good backup I had just run on the old system, I did the following command:
> 
>     /usr/share/mythtv/mythconverg_restore.pl <http://mythconverg_restore.pl> --drop_database --create_database --filename /full path to
>     directory/mythconverg-1214-20080626150513.sql.gz
> 
> 
>     Jim A
> 
> 
> Thanks.  I tried that and it's denying me access to the database.  The --verbose option shows it has the right username, but says DBHostName, 
> DBUserName, and DBPassword are not defined and its expecting to find them in the Mysql Options File.  Not sure what options file it means or 
> what password to specify.

The user running the program must have a valid config.xml. It falls back to the old mysql.txt and
those are the old variable names. It appears that neither was found (and mysql.txt hasn't been
used for years so that's good!).

Ubuntu packaging creates /etc/mythtv/config.xml and adds symbolic links to it from the login user
and mythtv user's ~/.mythtv/config.xml. At least, that's what it should do.

-- 
Bill


More information about the mythtv-users mailing list