Usefulness of database backup

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
jarnos
Junior
Posts: 20
Joined: Sun Aug 11, 2019 8:17 am
Finland

Usefulness of database backup

Post by jarnos » Wed Mar 25, 2020 9:55 am

If I do database backup and record and delete recordings thereafter, and then restore database, will there be a situation where database and recordings are not in sync? How to deal with that?

Related wiki: https://www.mythtv.org/wiki/Database_Backup_and_Restore

wesnewell
Senior
Posts: 550
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Usefulness of database backup

Post by wesnewell » Wed Mar 25, 2020 1:49 pm

It's not really very useful to me as the DB gets backed up with my weekly system backup, and even then there are errors with the recordings listings if you've recorded or deleted any since the backup, which is always in my case. But the useful part is all the recording rules and other configs are there so you don't need to reconfigure them.
BE/FE-Asrock AB350 Pro AMD Ryzen 3 2200G, 6 atsc tuners. Frontends-GF8200's,,AMD Athlon II's. Mythtv user since 2005.

LinuxGeek28
Newcomer
Posts: 3
Joined: Mon Dec 24, 2018 4:55 pm
United States of America

Re: Usefulness of database backup

Post by LinuxGeek28 » Wed Mar 25, 2020 5:19 pm

Just about every configuration of the system is stored in the DB. A DB backup lets you reinstall MythTV to a vanilla OS and be up and running in short time.
There are community scripts that can detect missing/orphans if some recordings were deleted since the last backup.

nexzzt
Newcomer
Posts: 10
Joined: Wed Jun 18, 2014 3:58 am
Australia

Re: Usefulness of database backup

Post by nexzzt » Thu Mar 26, 2020 5:35 am

You can also quickly clean up recordings with missing files (which is what you'll have in your scenario) using the find_orphans script: https://www.mythtv.org/wiki/Find_orphans.py

I find it very useful to have DB backups. It saves hours of configuration. I've got a daily scripted backup that saves to google drive, and have used them a few times over the years.

User avatar
bill6502
Developer
Posts: 1463
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Usefulness of database backup

Post by bill6502 » Thu Mar 26, 2020 9:10 pm

The issue is discussed every so often on the mailing list. Some (very few) users
use RAID for their recordings. Others backup the recordings themselves. For
the most part, the opinion is "it's only TV" so losses are OK. Especially since
some programs can be re-recorded.

jarnos
Junior
Posts: 20
Joined: Sun Aug 11, 2019 8:17 am
Finland

Re: Usefulness of database backup

Post by jarnos » Thu Mar 26, 2020 10:47 pm

I was thinking about this because I have been using version 30 for months and it works worse than 29, but maybe it is too late to restore and downgrade.

Post Reply