Kodi Community Forum

Full Version: How to move everything TV-related from one system to another?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am currently running Kodi on a Raspberry Pi 3B+. I would like to migrate the whole system to a new Raspberry Pi 4B. Now, I would be comfortable with manually configuring everything all over again except for all the timer recording rules and all the recordings, which I would like preserve from the old system. I'm using the default Kodi player, TVHeadEnd HTSP Client and TVHeadEnd Server with the Raspberry Pi TV tuner hat. I've saved all my recordings to a local folder.

What would be the most reasonable method of moving the time rules and the recordings to the new system? Should I make a full backup of Kodi and then restore it in the new system and then manually move the recorded files? Or is there a way to backup only TVHeadEnd-related stuff?
Please excuse me if my question is a bit amateurish but I found no clear answer to this question online and I reckon there are people here with experience with this matter.
The timers and the path(s) to the recordings are held in the TVH server.  I'm not sure exactly where TVH stores its data on a Pi, but generally on a linux system it stores it in /home/hts  so if you make a copy of that and everything in it, then presuming you install the same version of TVHeadend on the new Pi, you can simply copy that backup into place and all the tvh data including channels, guides etc will be the same.  Obviously you will have to replicate the recordings path(s) on the new Pi that you had previously.
(2020-09-02, 23:50)black_eagle Wrote: [ -> ]The timers and the path(s) to the recordings are held in the TVH server.  I'm not sure exactly where TVH stores its data on a Pi, but generally on a linux system it stores it in /home/hts  so if you make a copy of that and everything in it, then presuming you install the same version of TVHeadend on the new Pi, you can simply copy that backup into place and all the tvh data including channels, guides etc will be the same.  Obviously you will have to replicate the recordings path(s) on the new Pi that you had previously.

Well on the older system I had Kodi on an SD card and then had an external disk where the recordings were saved. The path where all recordings were saved was /var/media/myRecordings, which was the mount point of the external disk.
On the new system I have Kodi installed on a bigger external disk to where I intend to save all recordings from now on.

I did a backup of the old system (Settings -> System) and restored it in the new system. Then I copied all the recorded TV shows to /storage/recordings and created a symlink at /var/media that pointed to the new recording location but the recordings were not found. I guess I could try again, this time relocating the TVHE-server configurations as well.
Hmm, shouldn't the symlink have been /var/media/myRecordings pointing to /storage/recordings in that case?
(2020-09-03, 19:32)black_eagle Wrote: [ -> ]Hmm, shouldn't the symlink have been /var/media/myRecordings pointing to /storage/recordings in that case?

Yeah, that's what I meant. It still didn't work. Something else with TVHeadEnd messed up.
(2020-09-03, 19:32)black_eagle Wrote: [ -> ]Hmm, shouldn't the symlink have been /var/media/myRecordings pointing to /storage/recordings in that case?
I tried the symlink-trick on a new Kodi/LibreELEC-installation on a different SSD but on the same RPI3B+. I got everything working as long as I had the original external SSD attached to the Pi so that TVHeadEnd could find the recordings at /var/media/myRecordings.

However, when I created the symlink then everything failed. I restarted Kodi but the system wouldn't boot anymore. I started to think that is it even be possible to fix this with the symlink-trick? Isn't everything outside /storage read-only so nothing created outside would persist, am I wrong? I'm starting to think I have to partition the new installation SSD and name the partition as myRecordings so that it would match the path of the old path of the recordings. It's stupid but at least they would be on the same physical drive.

Is there some Linux terminal trickery that can be utilized to "teach" TVHeadEnd to look for the old recordings in a new path?

EDIT: The partitioining trick worked. I'm now running Kodi from a different SSD on the same RPI3B+. I am still going to try to move it to a RPI4B later.
(2020-09-05, 10:10)der_general Wrote: [ -> ]Is there some Linux terminal trickery that can be utilized to "teach" TVHeadEnd to look for the old recordings in a new path?

You can do that from the web interface and just point the recordings directory to a new one.  Whether it will pick up the old recordings though is a different matter.  If for some reason you don't want to use the web IF, the config file for the dvr part is at /home/hts/.hts/tvheadend/dvr/config/.  In there you'll find a file with a long UUID as the name and if you look inside it you will find it's a json object.  You will see the path to the recordings in there which you can edit with nano or something.