[mythtv-users] How do I restore a MythDora 0.25.3 database into Fedora 19 with MythTV 0.26.0?

Michael T. Dean mtdean at thirdcontact.com
Tue Aug 20 18:38:46 UTC 2013


On 08/20/2013 02:23 PM, Bob Shanteau wrote:
> I am currently running MythDora, but it has been "retired for the time 
> being." I have upgraded my installation to MythTV 0.25.3 and am 
> interested in upgrading to MythTV 0.26 running on the current version 
> of Fedora to see if it resolves any of the bugs I am seeing now. 
> Rather than installing another prepackaged version of Linux and MythTV 
> (e.g., MythBuntu or LinHES), this time I wanted to install MythTV on 
> Fedora myself.
>
> I have been successful in following the instructions here to install 
> MythTV 0.26.0 on Fedora 19, except that I used the GUI Software 
> Install program instead of the command line:
> <http://www.mythtv.org/wiki/Installing_MythTV_on_Fedora>
>
> I am trying to follow the instructions in the MythTV Wiki on how to 
> restore a database but I am stuck on the following instruction 
> (replacing the actual location and filename):
>
> ---
> <http://www.mythtv.org/wiki/Database_Backup_and_Restore>
> Replacing an existing database
>
> 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. You can do 
> this by adding the --drop_database --create_database arguments to the 
> command-line.
>
> # mythconverg_restore.pl --drop_database --create_database --location 
> /home/mythtv/dorabackup --filename mythconverg.sql.gz
> ---
>
> Here is the message I get in return.
>
> ---
> [root at localhost dorabackup]#  mythconverg_restore.pl --drop_database 
> --create_database --directory /storage/dorabackup --filename 
> mythconverg.sql.gz --verbose
> Configuring environment:
>   -    username: root
>   -        HOME: /root
>   - MYTHCONFDIR: /root/.mythtv
>
> Parsing configuration files:
>   - checking: /root/.mythtv/config.xml
>   - checking: /usr/local/share/mythtv/mysql.txt
>   - checking: /usr/share/mythtv/mysql.txt
>   - checking: /usr/local/etc/mythtv/mysql.txt
>   - checking: /etc/mythtv/mysql.txt
>   - checking: /root/.mythtv/mysql.txt
>   - checking: mysql.txt
>   - checking: /root/.mythtv/mysql.txt
>   - checking: /root/.mythtv/backuprc
>
> Applying command-line arguments.
>
> Checking configuration.
>
> WARNING: DBName not specified. Using mythconverg
>
> WARNING: DBHostName not specified.
>          Assuming it is specified in the MySQL options file.
>
> WARNING: DBUserName not specified.
>          Assuming it is specified in the MySQL options file.
>
> WARNING: DBPassword not specified.
>          Assuming it is specified in the MySQL options file.
>
> Database Information:
>          DBHostName:
>              DBPort: -1
>          DBUserName:
>          DBPassword:
>              DBName: mythconverg
>         DBSchemaVer:
>   DBBackupDirectory: /storage/dorabackup
>    DBBackupFilename: mythconverg.sql.gz
>       drop_database: yes
>     create_database: yes
>
> Executables:
>        mysql_client: mysql
>          uncompress: gzip -d
>
> Miscellaneous:
>     partial_restore: no
>    restore_xmltvids: no
>     change_hostname: no
>
> Checking database.
>
> Preparing initial database.
>
> Unable to connect to database.
>            database: mythconverg
>                host:
>            username:
>            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.
> ---
>
> What do I need to do?

You need a valid $HOME/.mythtv/config.xml file that lists database 
connection information.  Or, if you'd prefer to have it automatically 
created for you by mythtv-setup after you restore the database, create a 
$HOME/.mythtv/backuprc file that specifies:

DBHostName=localhost
DBName=mythconverg
DBUserName=mythtv
DBPassword=mythtv

(but update values as required).  Then run the restore, then start up 
mythtv-setup and give it the database information and tell it to save 
the configuration, then verify everything works properly.

Also, make sure the new MythTV host uses the exact same host name that 
the old host used or else you'll need to do a lot more work before your 
start up any MythTV programs.  For example, if your MythDora box was 
called "tvbox", make sure the new Fedora box is called "tvbox"--that the 
hostname program on both systems returns the exact same name (including 
domain--so if the old used tvbox.localdomain, the new needs to use the 
same).

See

mythconverg_restore.pl --help --help

under the "DATABASE INFORMATION FILE" section for (far) more information 
(than you care to know) about the backuprc file.

Mike


More information about the mythtv-users mailing list