[mythtv-users] Disaster recovery
Stephen Worthington
stephen_agent at jsw.gen.nz
Mon Feb 24 11:05:15 UTC 2020
On Mon, 24 Feb 2020 09:18:06 +0000, you wrote:
>Hi,
>
>Lost the OS disk on my back-end in the week. Fortunately, recordings,
>videos and crucially, a database backup from the weekend are all intact
>on a separate disk. This was all running on Xubuntu 18.04 with Mythv
>0.29/fixes and a Hauppauge WinTV-QuadHD-DVB.
>
>Replacement root disk arrived and I have rebuilt the OS. Am I right in
>thinking that I just follow these steps (without going into myth-setup):-
>
>sudo add-apt-repository ppa:mythbuntu/29
>sudo apt install mythtv
>sudo adduser $USER mythtv
>mkdir -p $HOME/.mythtv
>ln -s -f /etc/mythtv/config.xml ~/.mythtv/config.xml
>sudo reboot
>
>then stop the backend, import the database backup using
>mythconverge_restore.pl, restart the backend and I should be good to go?
>
>Thanks
I have created a new system using an existing database before, so here
are some random things I can remember from the process. There is no
way I will have remembered all the problems I ran across.
I do not recall ever having to manually create the mythtv user in an
Ubuntu install - that is done automatically by the packages. So drop
those two lines.
What database were you using? If it was MySQL and you want to
continue using that, the above is fine. But MariaDB is better, so if
you want to use that instead, make sure you uninstall MySQL and
install MariaDB before you install the MythTV packages.
If you are using any non-standard database user IDs, they will need to
be put back into MySQL/MariaDB with the right permissions before you
install MythTV. They are stored outside the mythconverg database, so
they will have been lost.
You may need to manually add the cron.weekly and cron.daily jobs that
do the database checking and backups as I am not sure if they are
added automatically. The scripts are in the mythtv packages somewhere
under /usr/share/mythtv and can be copied to the /etc/cron.xxxx
directories and edited as required.
You will need to set up fstab to mount all your drives properly, in
the same places as the storage groups in the database point to.
When you install a new Linux system, the only group and user IDs that
will generally be the same are root:root. This means your new mythtv
user and group will almost certainly have different ID numbers from
the ones on your old system. So the ownership of the recording
directories and the files in them on your old drives will need to be
updated to use the new IDs - just do "chown -R mythtv:mythtv" on them.
If you are using an infrared remote, remember that the LIRC package in
Ubuntu 18.04 is seriously broken - you need to run my script to fix
it:
http://www.jsw.gen.nz/mythtv/lirc-ubuntu-18.04-install.sh
If you had customised the LIRC keystrokes in the $(HOME)/.lirc
directory, those will be lost and will need to be re-created.
If you were using a customised theme in the $(HOME)/.mythtv/themes
directory, that will need to be re-created.
There will undoubtedly be umpteen bits of customisation of your system
that you have done over the years that will have been lost and will
need to be done again. For example, did you use ssh to access that
PC? If so, it will need to be installed and configured again.
Likewise SAMBA or NFS, if you use them. Had you disabled the various
screensaver options? Had you disabled pulse audio? ...
More information about the mythtv-users
mailing list