Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Can't restore Database

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


greg12866 at nycap

May 14, 2012, 8:53 PM

Post #1 of 4 (740 views)
Permalink
Can't restore Database

I was having problems with my setup so I decided to format and start
over...Everything goes fine until I try to restore my database.. I have
restored many times in the past and never had an issue..
I am able to run mythtv-setup with a new DB and I can set it up,but I
would like to not loose my settings..

Here is a verbose attempt...

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

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

Applying command-line arguments.

Checking configuration.

No filename specified. Attempting to find the newest database backup.
Using database backup file:
/video4/db_backups/mythconverg-1301-20120510093443.sql.gz

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: /video4/db_backups
DBBackupFilename: mythconverg-1301-20120510093443.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.

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.

Any ideas??????
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


keemllib at gmail

May 14, 2012, 9:48 PM

Post #2 of 4 (717 views)
Permalink
Re: Can't restore Database [In reply to]

On 05/14/2012 10:53 PM, Greg wrote:
> I was having problems with my setup so I decided to format and start over...Everything goes fine until I try to restore my database.. I have
> restored many times in the past and never had an issue...
...
> Database Information:
> DBHostName:
> DBPort: -1
> DBUserName:
> DBPassword:
> DBName: mythconverg
> DBSchemaVer:
> DBBackupDirectory: /video4/db_backups
...
> Any ideas??????

Hi;

With DBSchemaVer 1301, I believe you're running master with the new
config.xml format.

If so, the restore and backup scripts don't handle the new format yet.

As a workaround, put this in the directory of the user running
the restore/backup, adjusted for your system:

someone [at] yourHos:~/.mythtv$ cat backuprc

DBBackupDirectory=/video4/db_backups
rotate=20
DBHostName=localhost
DBUserName=mythtv
DBPassword=yourPassword
DBName=mythconverg
DBPort=3306

You may also find that backups running out of cron are failing and need
to add this in the respective user's .mythtv directory.

Note that the schema won't be part of the filename.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 14, 2012, 10:37 PM

Post #3 of 4 (709 views)
Permalink
Re: Can't restore Database [In reply to]

On 05/15/2012 12:48 AM, Bill Meek wrote:
> On 05/14/2012 10:53 PM, Greg wrote:
>> I was having problems with my setup so I decided to format and start
>> over...Everything goes fine until I try to restore my database.. I have
>> restored many times in the past and never had an issue...
> ...
>> Database Information:
>> DBHostName:
>> DBPort: -1
>> DBUserName:
>> DBPassword:
>> DBName: mythconverg
>> DBSchemaVer:
>> DBBackupDirectory: /video4/db_backups
> ...
>> Any ideas??????
>
> Hi;
>
> With DBSchemaVer 1301, I believe you're running master with the new
> config.xml format.
>
> If so, the restore and backup scripts don't handle the new format yet.
>
> As a workaround, put this in the directory of the user running
> the restore/backup, adjusted for your system:
>
> someone [at] yourHos:~/.mythtv$ cat backuprc
>
> DBBackupDirectory=/video4/db_backups
> rotate=20
> DBHostName=localhost
> DBUserName=mythtv
> DBPassword=yourPassword
> DBName=mythconverg
> DBPort=3306
>
> You may also find that backups running out of cron are failing and need
> to add this in the respective user's .mythtv directory.
>
> Note that the schema won't be part of the filename.

Bill's advice is good advice, but I went ahead and pushed a change that
will allow the backup/restore scripts to work properly with the new
config.xml format. The new versions of the scripts will still work with
the old config.xml format, too. Anyone who wants/needs the update can
pull a copy of the new version as described in the 2nd paragraph at
http://www.mythtv.org/wiki/Database_Backup_and_Restore .

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


greg12866 at nycap

May 15, 2012, 9:05 AM

Post #4 of 4 (703 views)
Permalink
Re: Can't restore Database [In reply to]

On 05/15/2012 01:37 AM, Michael T. Dean wrote:
> On 05/15/2012 12:48 AM, Bill Meek wrote:
>> On 05/14/2012 10:53 PM, Greg wrote:
>>> I was having problems with my setup so I decided to format and start
>>> over...Everything goes fine until I try to restore my database.. I have
>>> restored many times in the past and never had an issue...
>> ...
>>> Database Information:
>>> DBHostName:
>>> DBPort: -1
>>> DBUserName:
>>> DBPassword:
>>> DBName: mythconverg
>>> DBSchemaVer:
>>> DBBackupDirectory: /video4/db_backups
>> ...
>>> Any ideas??????
>>
>> Hi;
>>
>> With DBSchemaVer 1301, I believe you're running master with the new
>> config.xml format.
>>
>> If so, the restore and backup scripts don't handle the new format yet.
>>
>> As a workaround, put this in the directory of the user running
>> the restore/backup, adjusted for your system:
>>
>> someone [at] yourHos:~/.mythtv$ cat backuprc
>>
>> DBBackupDirectory=/video4/db_backups
>> rotate=20
>> DBHostName=localhost
>> DBUserName=mythtv
>> DBPassword=yourPassword
>> DBName=mythconverg
>> DBPort=3306
>>
>> You may also find that backups running out of cron are failing and need
>> to add this in the respective user's .mythtv directory.
>>
>> Note that the schema won't be part of the filename.
>
> Bill's advice is good advice, but I went ahead and pushed a change that
> will allow the backup/restore scripts to work properly with the new
> config.xml format. The new versions of the scripts will still work with
> the old config.xml format, too. Anyone who wants/needs the update can
> pull a copy of the new version as described in the 2nd paragraph at
> http://www.mythtv.org/wiki/Database_Backup_and_Restore .
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
Thanks to Mike and Bill I got it to restore.....
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.