Restoring orphaned recordings to the database

For discussion of topics specific to MythTV on linux
Post Reply
pinnerite
Senior
Posts: 301
Joined: Mon Apr 07, 2014 2:34 pm
Location: Harrow Weald
Great Britain

Restoring orphaned recordings to the database

Post by pinnerite »

A restoration from a nasty system crash left m with recordings but an unmatched database.
This is on Linux Mint 19.3 and Mythtv v.32

My new VBF ChatGPT has suggested utilising:

$ myth.rebuilddatabase.pl --dir /home/mythtv/Default

but command not found; and

$ sudo apt install mythtv-utils

but Unable to locate package mythtv-utils

Can anyone help?
blm-ubunet
Senior
Posts: 275
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Restoring orphaned recordings to the database

Post by blm-ubunet »

I don't know any nice simple way.
0. There's a python script here viewtopic.php?f=2&t=4975&start=30
1. You can create a manual recording & then rename your recording file to replace it
2. use mytharchive to import a recording file (folder with metadata)
3. record from a file using a recorder script.

Extra detail on the above:
0. Never tried using this but seems the best method..
1. Limited to GUI editing metadata of a normal recording. So may have wrong tuner/channel etc.
Have to rebuild seektable/duration with mythutil or mythcommflag.
2. need to create or modify an existing mythexport folder structure. I think all metadata is in simple text file.
3. think this is still an option, would need configure this as tuner input method, recording metadata will still be problem.

You could just move files to Videos & edit metadata or rename files etc.
User avatar
pgbennett
Developer
Posts: 575
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Restoring orphaned recordings to the database

Post by pgbennett »

I think chatGPT is making stuff up. The normal recommendation is to add them to videos and watch them from there. Manually adding recordings is possible but there is no official method of doing that. Some people have scripts to do it.

My script is here but it is entirely unsupported and needs various things set up for it to work.

https://github.com/bennettpeter/mythscr ... cording.sh
white_haired_uncle
Senior
Posts: 563
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Restoring orphaned recordings to the database

Post by white_haired_uncle »

I still don't understand why the debian-ish packages put database backup in cron.weekly. Better than nothing, I guess, but I wouldn't leave it there.
User avatar
bill6502
Developer
Posts: 2439
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Restoring orphaned recordings to the database

Post by bill6502 »

I recall the script being in cron.weekly, the the actual backup is in /var/lib/mythtv/db_backups. Just
ran the 'stock' version myself and it went to the right place. Any chance you have a ~/.mythtv/backuprc
file with the DBBackupDirectory set elsewhere?

Really a different thread.
white_haired_uncle
Senior
Posts: 563
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Restoring orphaned recordings to the database

Post by white_haired_uncle »

Sorry, looking back my comment wasn't clear. I meant it put the database backup command in cron.weekly, not cron.daily where it belongs.
Post Reply