View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Jan 24, 2014 4:32 pm 
Offline
Joined: Sat May 12, 2007 2:41 am
Posts: 49
Location: Southern Germany
Having just gone through the upgrade process from LinHES 6.04 to LinHES R8 I thought I'd document my steps. Perhaps there are others out there who need to do the same…

How-to update LinHES 6.04 to a new LinHES 8 machine:

Preliminary remark: Steps 1-12 are very long and seemingly complicated. There is an easier way described on the LinHES wiki, but that involves using the same PC for 8.0 that you used for 6.04, leaving you without a working machine if it does not work. This is the reason I decided to do the upgrade on a virtual machine. Of course you can also use a real PC wherever the howto mentions VM.

If you do the upgrade on the same PC LinHES R6 is running, there is a much easier way to upgrade described on the LinHES wiki.
  1. Backup LinHES 6.04
  2. copy /myth/back/mythconverg.sql.gz to another machine, you will need it later
  3. create a virtual machine or a different computer, boot it with LinHES 7.4 CD (or CD-image in cad of VM) with at least a 30GB disk
  4. install LinHES 7.4, you can leave all default options (you can increase root volume size from 5GB to 10GB but this should only be necessary if you have a really big database) EXCEPT for the hostname: This should be the same as your old mythtv box.
  5. reboot, go through the setup wizard, no need to change settings. All defaults should be fine.
  6. exit mythfrontend (in main menu press 'm' the Exit Frontend)
  7. Open an XTerm by pressing ctrl-x
  8. cd to /myth/backup
  9. copy the file created in step 2 to the new machine (e.g. using "scp username@machine-where-file-is:/path/to/mythconverg.sql.gz .")
  10. This is important: Shut down your old machine now. If possible separate the new machine from your network. Otherwise you might get in trouble later after restoring the old database: It still has the old backend IP address and might then try to update the database on the old, wreaking havoc with your existing old backend.
  11. sudo sv stop mythbackend
  12. restore the old database on the new machine: sudo /usr/share/mythtv/mythconverg_restore.pl --drop_database --create_database --directory /myth/backup --filename mythconverg.sql.gz (this will run for some time…)


    Great! The old database is on the new machine. Now comes the critical part: mythtv has to update the database schema. I had a lot of trouble with this. The way I describe here *should* work. If it doesn't: good luck googling…

  13. restart mythbackend manually: sudo mythbackend.
  14. Wait. It will do a backup first, then ask if it should upgrade the database. Say yes.
  15. After the database upgrade has finished (can take many minutes) mythbackend should be running. start mythfrontend by pressing alt-m. It may complain that it cannot find a backend. Got to settings, set up backend address to 127.0.0.1. Exit mythfrontend.
  16. Go back to the xterm you started mythbackend in. Is it still running? (the output should show some errors that it cannot connect to the backend and give the IP address of your old machine). If yes, kill the backend (ctrl-c).
  17. Start mythtv-setup by pressing alt-s. Go to the first settings screen and correct the IP addresses of "This backend" and "Master backend" both to 127.0.0.1
  18. exit mythtv-setup.
  19. start mythbackend again (sudo mythbackend). This time it should run.
  20. start mythfrontend. A screen will appear asking to upgrade the database *again* (this time for MythMusic). Let it go ahead.
  21. Finally: In mythfrontend, you should be able to go to MEdia->Recordings and see all your previous recordings. (although they will be greyed out because they are not available. That's okay for now).

The database upgrade to 7.4 and to a new machine is done. Now on to the upgrade to 8.0.
This can be done by following the instructions on the LinHES wiki, where jams has done a great job of describing the (non-trivial) way to upgrade from 7.4 to 8.0 and later 8.1 (this is important: The instructions on the wiki are only for 8.0 installs! Upgrade from 7.4 to 8.0. Later, you can upgrade to 8.1 by simply doing sudo pacman -Syu).

Hope this helps somebody.

jens


Top
 Profile  
 
PostPosted: Fri Jan 24, 2014 11:07 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1196
Location: Orlando FL
This is how I had to upgrade from 6.3 to 7.2 The schema upgrade was failing. I however had better luck when I only did a partial restore similar to the instructions for upgrading to R8 http://www.mythtv.org/wiki/Database_Bac ... f_a_backup
This essentially only restores the bare minimum the recording data and database.

Good Writeup Heilig

_________________
My System


Top
 Profile  
 
PostPosted: Sun Jan 26, 2014 11:09 am 
Offline
Joined: Sat May 12, 2007 2:41 am
Posts: 49
Location: Southern Germany
The schema update from 6.04 to 7.4 was a real problem for me. I think there is a difference between letting mythtv-setup do the upgrade and letting mythbackend do this. When performing an "Upgrade" install it seems mythtv-setup does the upgrade, and this always failed for me.

Manually stopping all mythtv services, restoring the (old) database and then letting mythbackend do the upgrade worked fine. That's why I put this in my notes and posted here, in the hopes that others might find it useful (although I guess most people have upgraded to R8 long ago :)

Jens


Top
 Profile  
 
PostPosted: Mon Jan 27, 2014 7:47 pm 
Offline
Joined: Mon Aug 14, 2006 8:24 pm
Posts: 295
Location: Melbourne, Australia
Many thanks heilig.

I currently have my machine at 7.2 because I could not get further due to troubles upgrading the schema. Even the partial restore approach did not work (or I did something wrong). I was going to try on a test machine going direct from 7.2 to 8.0. Can that work or would that be wasting my time? The wiki talks about going from R7.X to R8, but does X mean the latest version?

If not, I will try your approach to get to 7.4.

_________________
Intel DG965WH, Dvico DVB-T Lite x2, HDHR, Gigabyte GT220, KingstonSSD, WD20EARS R8.4.3


Top
 Profile  
 
PostPosted: Mon Jan 27, 2014 10:16 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1196
Location: Orlando FL
So the cool thing about virtualbox is that you can take snapshots of your OS. That means there is always a backup no matter how much you screw up your virtual install.
first snapshot I call virgin. just a fresh install of LinHES current version (7.2 in your case) no settings except the bare minimum not even tuners
Second Snapshot save after you do a partial restore. This will leave all of your settings and home folder behind but bring your recording history forward.
Now the fun begins using that second snapshot do a system backup not a regular backup. I'm not sure what the difference is but there is one I'm sure. http://linhes.org/projects/linhes/wiki/ ... -R7-system
Quote:
On the R7 system create a system backup and copy it to another machine.
To create the backup run: sudo lh_system_backup_job
This will create a file in /myth/system_backups/ named backup.$todays_date.
Next copy the most recent backup file to another machine, preferably one with a web browser that can be used later.
If you are reusing a R7 hard drive then all of /myth will need to be copied to another machine.

Save that backup to your PC somehow.
Now you have two choices you can try the upgrade to 7.4 and see if you can make that Schema jump first or you can try and go straight to 8.1. either way you still have snapshot saved of a working LinHES to work from.

For LinHES 8.1 Start a new VM with the iso loaded for 8.1 and install it and follow the steps on the guide to restore your DB to that 8.1 install.
Once you are successful make a full backup save it out and install 8.1 on a spare drive in your LinHES box (it will wipe your drive) and restore from the 8.1 backup you made.
to upload and restore using the webpage like as described in the upgrade guide I had to do a
Code:
sudo updatedb
from the terminal window.

_________________
My System


Top
 Profile  
 
PostPosted: Tue Jan 28, 2014 5:08 pm 
Offline
Joined: Sat May 12, 2007 2:41 am
Posts: 49
Location: Southern Germany
mattbatt's advice about using snapshots with the VM is very good. Saves a lot of time if it doesn't work the first time. (And since we are talking about computers, it never does...)

One more thing: You can try do do a database repair on (a copy of) your 7.2 database in the virtual machine before attempting the upgrade. This can be done through mythweb (I think the button to click is at the top of the screen and is called "service" or "settings". The icon shows a hammer). Try an "extended repair".

Then follow mattbatt's advice or the guide in the first post.

I would try 8.0 instead of 8.1 for an upgrade, though. I think I read somewhere that partial upgrades should not be performed with differing database schemas. I have not tried it, though, and it might as well work. But going from 8.0 to 8.1 is so easy, I did not bother trying when I did my upgrade.

jens


Top
 Profile  
 
PostPosted: Wed Jan 29, 2014 7:25 pm 
Offline
Joined: Mon Aug 14, 2006 8:24 pm
Posts: 295
Location: Melbourne, Australia
Yes I can see the advantage of the VM approach. In the past I struggled with VM on my test machine due to lack of ram (1GB), so this morning I bit the bullet and bought 4GB. I plan to try the upgrade on the weekend.

_________________
Intel DG965WH, Dvico DVB-T Lite x2, HDHR, Gigabyte GT220, KingstonSSD, WD20EARS R8.4.3


Top
 Profile  
 
PostPosted: Sun Feb 09, 2014 12:19 am 
Offline
Joined: Mon Aug 14, 2006 8:24 pm
Posts: 295
Location: Melbourne, Australia
Well I finally got around to trying this. After a bit of stumbling around I successfully got up to R7.4 on my test machine using your partial restore technique. I have about 4 snapshots taken along the way so I have plenty of spots to retreat to. My next step is to try R8.

One question I have is LinHES on VM always very slow. My test machine has an AMD 64 dual core 4000+ processor and 4 GB of memory with Linux Mint13 as the OS. I allocated 1.6 GB for LinHES and even when it's not doing anything it is still using over 50% of the CPU (100% 1 core). Are there tweaks I can do? I tried adding a dummy VM based on some google searches but that did not help. When I run windows xp in VM with 400MB it's really fast.
[url][/url]
Also did you manage to Guest Additions loaded succesfully. I tried using this method but it failed to find ./VBoxLinuxAdditions.run. I had to resort to the wget from dropbox method which is a bit painful.

_________________
Intel DG965WH, Dvico DVB-T Lite x2, HDHR, Gigabyte GT220, KingstonSSD, WD20EARS R8.4.3


Top
 Profile  
 
PostPosted: Sun Feb 09, 2014 3:34 am 
Offline
Joined: Sat May 12, 2007 2:41 am
Posts: 49
Location: Southern Germany
nicom wrote:
Well I finally got around to trying this. After a bit of stumbling around I successfully got up to R7.4 on my test machine using your partial restore technique. I have about 4 snapshots taken along the way so I have plenty of spots to retreat to. My next step is to try R8.


I had a lot of trouble going to 7.4: the schema upgrade kept failing. Steps 6-20 in the first post finally worked. I think it had to do with several mythtv modules ( backend, setup, possibly frontend) all trying to upgrade the schema.

nicom wrote:
One question I have is LinHES on VM always very slow. My test machine has an AMD 64 dual core 4000+ processor and 4 GB of memory with Linux Mint13 as the OS. I allocated 1.6 GB for LinHES and even when it's not doing anything it is still using over 50% of the CPU (100% 1 core). Are there tweaks I can do? I tried adding a dummy VM based on some google searches but that did not help. When I run windows xp in VM with 400MB it's really fast.
[url][/url]
Also did you manage to Guest Additions loaded succesfully. I tried using this method but it failed to find ./VBoxLinuxAdditions.run. I had to resort to the wget from dropbox method which is a bit painful.


I did not do much in the VM except upgrade to 7.4 and 8.1. But I tried to install the Guest Additions and failed. Didn't really need them, though, so I did not pursue the issue further.

Jens


Top
 Profile  
 
PostPosted: Sun Feb 09, 2014 7:19 pm 
Offline
Joined: Mon Aug 14, 2006 8:24 pm
Posts: 295
Location: Melbourne, Australia
Jens,

I actually followed mattbatt's suggestion and updated from 7.2 to 7.4 using "pacman -Syu". I got the usual message about the schema needing upgrading but when I clicked the upgrade button it magically worked.

Richard

_________________
Intel DG965WH, Dvico DVB-T Lite x2, HDHR, Gigabyte GT220, KingstonSSD, WD20EARS R8.4.3


Top
 Profile  
 
PostPosted: Mon Feb 10, 2014 8:52 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1196
Location: Orlando FL
Awesome!!! I'm glad it worked for you guys. I never could get Guest additions working either since my LinHES box is my only network storage I just pushed and pulled files from there instead of dropbox.

_________________
My System


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu