Usefulness of database backup

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

Moderator: Forum Moderators

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

Usefulness of database backup

Post by jarnos »

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: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Usefulness of database backup

Post by wesnewell »

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 Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
LinuxGeek28
Junior
Posts: 17
Joined: Mon Dec 24, 2018 4:55 pm
United States of America

Re: Usefulness of database backup

Post by LinuxGeek28 »

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
Junior
Posts: 18
Joined: Wed Jun 18, 2014 3:58 am
Australia

Re: Usefulness of database backup

Post by nexzzt »

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: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Usefulness of database backup

Post by bill6502 »

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: 38
Joined: Sun Aug 11, 2019 8:17 am
Finland

Re: Usefulness of database backup

Post by jarnos »

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