[mythtv-users] Proper way/user to run mythconverg_restore.pl when restoring old database on clean install
Ian Evans
dheianevans at gmail.com
Thu Sep 28 21:04:15 UTC 2017
On Thu, Sep 28, 2017 at 4:49 PM, Hika van den Hoven <hikavdh at gmail.com>
wrote:
>
> Hoi Ian,
>
> Thursday, September 28, 2017, 10:40:11 PM, you wrote:
>
> > On Thu, Sep 28, 2017 at 4:22 PM, Hika van den Hoven <hikavdh at gmail.com
>wrote:
>
> > Hoi Ian,
> >
>
> > Thursday, September 28, 2017, 10:11:41 PM, you wrote:
> >
> >> On Thu, Sep 28, 2017 at 4:00 PM, Hika van den Hoven <hikavdh at gmail.com>
wrote:
> >>>
> >>> Hoi Ian,
> >>>
> >>> Thursday, September 28, 2017, 9:32:37 PM, you wrote:
> >>>
> >>> > Doing the clean install method after upgrading my system to 16.04.
> >>>
> >>>
> >>> > I ran the following command line to install the old database:
> >>>
> >>>
> >>> > sudo -u mythtv /usr/share/mythtv/mythconverg_restore.pl--verbose
> >>> > --drop_database --create_database --directory /home/mythtv
> >>> > --filename mythconverg-1317-20170928112702.sql.gz
> >>>
> >>>
> >>>
> >>> > It fails with an unable to connect to database and this
environment:
> >>>
> >>>
> >>> > Configuring environment:
> >>> > - username: mythtv
> >>> > - HOME: /home/ian
> >>> > - MYTHCONFDIR: /home/ian/.mythtv
> >>>
> >>>
> >>> > Parsing configuration files:
> >>> > - checking: /home/ian/.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: /home/ian/.mythtv/mysql.txt
> >>> > - checking: mysql.txt
> >>> > - checking: /home/ian/.mythtv/mysql.txt
> >>> > - checking: /home/ian/.mythtv/backuprc
> >>>
> >>>
> >>> > Doing a 'locate config.xml' it's only at these locations:
> >>>
> >>>
> >>> > /etc/mythtv/config.xml
> >>> > /home/mythtv/.mythtv/config.xml
> >>> > /usr/share/doc/mythtv-backend/contrib/config_files/config.xml
> >>> > /usr/share/mythtv/config.xml
> >>>
> >>>
> >>> > How do I get the command line to ignore /home/ian and
/home/ian/.mythtv?
> >>>
> >>>
> >>> > Thanks!
> >>>
> >>> You first need to create the database and the rights before you can
> >>> restore.
> >
> >
> >> Not sure if I'm following. The mythtv installation has already
> >> created a mythconverg database which I can login to. I just need to
> >> restore my .27 database so that it will change the schema upon
> >> running. I thought --drop_database --create_database took care of
> >> that. I didn't see any other step about rights on
> >>
https://www.mythtv.org/wiki/Database_Backup_and_Restore#Database_Restore.
> >> Just thought my issue was looking for config/xml in the wrong place,
> >> since it is in the mythtv user locations but looking in the root
user's.
> >
> > Is /home/ian the root users home directory? Because then it is
> > completely logical. You are using sudo, so you are running as root. So
> > try without sudo.
> >
>
>
>
>
> > Tried without sudo and it's still looking in /home/ian instead of
/home/mythtv:
>
>
> > ian at buster:/home/mythtv$ /usr/share/mythtv/mythconverg_restore.pl
> > --verbose --drop_database --create_database --directory
> > /home/mythtv --filename mythconverg-1317-20170928112702.sql.gz
>
>
> > Configuring environment:
> > - username: ian
> > - HOME: /home/ian
> > - MYTHCONFDIR: /home/ian/.mythtv
>
>
> > Parsing configuration files:
> > - checking: /home/ian/.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: /home/ian/.mythtv/mysql.txt
> > - checking: mysql.txt
> > - checking: /home/ian/.mythtv/mysql.txt
> > - checking: /home/ian/.mythtv/backuprc
>
>
> Again logical as you are obviously logged in as ian. So if you plan to
> do your maintenance under the user ian, copy (or simlink) the
> config.xml, mysql.txt and backuprc from /home/mythtv/.mythtv to
> /home/ian/.mythtv . If you simlink, make sure they are readable by
> both users by making them both member of the group (mythtv ?) owning
> the files and giving that group read rights. Else log in as mythtv.
>
>
Now I know why I needed coffee. ;-P
ran
sudo -i -u mythtv
then /usr/share/mythtv/mythconverg_restore.pl --verbose --drop_database
--create_database --directory /home/mythtv --filename
mythconverg-1317-20170928112702.sql.gz
Just finished running. I run mythtv-setup next to update the schema, right?
Thanks.
Just
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20170928/46f874c9/attachment-0001.html>
More information about the mythtv-users
mailing list