Factory Reset
Added by Werner Karl about 9 years ago
As my question to this topic:
https://tvheadend.org/boards/5/topics/17539
remains unanswered, I would like to do somthing like a "Factory Reset" in tvheadend. Is there a way to do a reset to initial start or so? Are there maybe other resets like an epg reset or scheduled recordings reset? No problem if it's only possible on command line, give it to me.
If such resets are possible, can I save my channel settings in order to restore them afterwards?
Replies (3)
RE: Factory Reset - Added by Mark Clarkstone about 9 years ago
Werner Karl wrote:
As my question to this topic:
https://tvheadend.org/boards/5/topics/17539
remains unanswered, I would like to do somthing like a "Factory Reset" in tvheadend. Is there a way to do a reset to initial start or so? Are there maybe other resets like an epg reset or scheduled recordings reset? No problem if it's only possible on command line, give it to me.
The only way to 'reset' is by deleting your config in /home/hts/.hts/tvheadend, it's as simple as stopping Tvheadend deleting the folder and restarting the service again. BACKUP FIRST!
Before you do that make sure your permissions are correct, mine are..
drwxr-xr-x 14 hts hts 4096 Aug 25 05:49 recordings drwxr-xr-x 3 hts hts 4096 Aug 19 23:28 timeshift
If such resets are possible, can I save my channel settings in order to restore them afterwards?
This honestly sounds like a permissions issue more than anything so a 'reset' won't help much.
RE: Factory Reset - Added by Werner Karl about 9 years ago
Thank you very much for your answer.
My first suspicion was also that this must be a permissions issue. This all seems so obvious. However, how much I'm looking into it, I can't find a permissions issue. If I "su - hts", I can access all files on the recording harddisk, I can create files and delete them again. And, just in case you wonder, the tvheadend binary is running with "-f -u hts -g video", and the hts user is member of the video group.
My config files are owned by the hts user, however the rights are only for the user:
drwx------ 2 hts video 4096 Aug 21 19:28 timeshift
which should not be a problem. Timeshift works, btw.
Another possible issue could be with mount options. I initially mounted the harddisk (ext4 fs) with the "defaults" option. It showed up that the "defaults" option includes the "noexec" option that could maybe lead to problems. Meanwhile I am mounting it only with "rw,auto" which should not lead to a problem. Nevertheless, the problem persists.
My recordings however are not set to be written below /home/hts/.hts , I am mounting the recordings harddisk to /home/hts/tv and the recording system path is set to /home/hts/tv/tv in the appropriate recording profile.
Further observations:
As I stated before, the error on recording start is
dvr: unable to create new channel streaming chain for <channel name>
After the end of the recording, tvheadend crashes:
Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: Signal: 6 in PRG: tvheadend (4.0.5) [eaa5d5781d89112683e1cccac8d9a12ece2a7caa] CWD: / Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: Fault address 0x6a000014cd (N/A) Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: Loaded libraries: /usr/lib/x86_64-linux-gnu/libdvbcsa.so.1 /lib/x86_64-linux-gnu/libssl.so.1.0.0 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: Register dump [23]: fefefefefefefe0000000000036a0420000000000000000800000000000002020000000000a082510000000000a082d0000000000000002c00007f Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: STACKTRACE Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: ??:0 0x461a69 Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: ??:0 0x7f70a225b340 Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: gsignal+0x39 (/lib/x86_64-linux-gnu/libc.so.6) Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: abort+0x148 (/lib/x86_64-linux-gnu/libc.so.6) Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: ??:0 0x7f70a19a7b86 Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: ??:0 0x7f70a19a7c32 Aug 26 19:04:01 tvheadend tvheadend[5325]: CRASH: ??:0 0x4922a6 Aug 26 19:04:02 tvheadend tvheadend[5325]: CRASH: ??:0 0x48ff4a Aug 26 19:04:02 tvheadend tvheadend[5325]: CRASH: ??:0 0x42c304 Aug 26 19:04:02 tvheadend tvheadend[5325]: CRASH: __libc_start_main+0xf5 (/lib/x86_64-linux-gnu/libc.so.6) Aug 26 19:04:05 tvheadend kernel: [341211.355227] init: tvheadend main process (5325) killed by ABRT signal Aug 26 19:04:05 tvheadend kernel: [341211.355250] init: tvheadend main process ended, respawning
This is a new observation, I probably should report that. This could be caused by a permissions problem or something else, but tvheadend should definitely not crash.
Some more ideas?
RE: Factory Reset - Added by Mark Clarkstone about 9 years ago
Werner Karl wrote:
Thank you very much for your answer.
My first suspicion was also that this must be a permissions issue. This all seems so obvious. However, how much I'm looking into it, I can't find a permissions issue. If I "su - hts", I can access all files on the recording harddisk, I can create files and delete them again. And, just in case you wonder, the tvheadend binary is running with "-f -u hts -g video", and the hts user is member of the video group.
My config files are owned by the hts user, however the rights are only for the user:
[...]
which should not be a problem. Timeshift works, btw.
Another possible issue could be with mount options. I initially mounted the harddisk (ext4 fs) with the "defaults" option. It showed up that the "defaults" option includes the "noexec" option that could maybe lead to problems. Meanwhile I am mounting it only with "rw,auto" which should not lead to a problem. Nevertheless, the problem persists.
My recordings however are not set to be written below /home/hts/.hts , I am mounting the recordings harddisk to /home/hts/tv and the recording system path is set to /home/hts/tv/tv in the appropriate recording profile.
Further observations:
As I stated before, the error on recording start is
[...]After the end of the recording, tvheadend crashes:
[...]This is a new observation, I probably should report that. This could be caused by a permissions problem or something else, but tvheadend should definitely not crash.
Some more ideas?
Looks like you've found a bug, I recommend you open an issue.
Make sure you install the debug package (tvheadend-dbg) so that those missing (??:0) details are filled.
What also might help is enabling trace, I'm not sure whats needed off the top of my head but try running Tvheadend with --trace +all --debug +all --logfile /path/to/log.txt
Or do it like this in the webui (this way you only get a log that contains messages once it's enabled & not at the start of Tvheadend which tend to be huge)..
Make sure you temporarily remove users/passwords (backup your config then remove the users/passwords & restart).