Forums » Tutorial and setups »
Relocation of recording files
Added by Chris Jones about 4 years ago
I have TVHeadend installed successfully on Fedora 32 and have several dozen recorded programs, which were all being stored on the /home/tvheadend directory folder. This was running out of space, so I have moved all the recorded files over to a larger disk, but now I cannot see them in the web interface.
The original location was /home/tvheadend/ and the new location is /export/home/tvheadend/. I have amended the DVB Scan files path to show the correct location.
Replies (6)
RE: Relocation of recording files - Added by Dave Pickles about 4 years ago
Each recording has a log file which includes the full filename(s) of the recording, these are usually in /home/hts/.hts/tvheadend/dvr/log/ though your distribution might have put them somewhere else. Edit these files (while TVHeadend is not running) to correct the path, the recordings should then be visible when you restart TVH.
RE: Relocation of recording files - Added by Chris Jones about 4 years ago
There are only the .ts files for each recording. Where will I find these files? There is no user hts, only one called tvheadend and there is no subdirectory .hts
RE: Relocation of recording files - Added by Dave Pickles about 4 years ago
Try these commands:
find / -regex ".*/dvr/log" -print
or
locate dvr/log
RE: Relocation of recording files - Added by Chris Jones about 4 years ago
I have now found the log files - they are in the folder /var/lib/tvheadend/config/dvr/log
I have discovered in another post a script that will supposedly perform the re-linking (importall.sh) at https://tvheadend.org/attachments/8392 but when I run this, it merely presents a warning "find: warning: '-name' matches against basenames only, but the given pattern contains a directory seperator ('/'), thus the expression will evaluate to false all the time. Did you mean '-wholename'?" and the script stops.
I am stumped.
RE: Relocation of recording files - Added by Dave Pickles about 4 years ago
That script is to create new log files for recordings that don't already have them, all you need to do is to modify the existing logs. Try this:
0. Stop TVHeadend
1. Backup all the log files to a safe place
2. Copy this script somewhere (NOT the log files directory!)
#!/bin/sh OLDDIR=/video/tvheadend NEWDIR=/my/new/dir LOGS=/var/lib/tvheadend/config/dvr/log for f in $LOGS/* do perl -i -p -e "s|$OLDDIR|$NEWDIR|" $f done
3. Edit the script for the old and new recording locations
4. Run the script
5. Check the files have been updated and restart TVHeadend.
RE: Relocation of recording files - Added by Chris Jones about 4 years ago
I was not able to run this script effectively, so reluctantly uninstalled and reinstalled TVHeadend. Now I have a properly working installation routing the output files to the correct directory. I was not able to recover the previously recorded programs, but I can live with that.