[mythtv-users] Mythtv automatic database backup

Mike Bibbings mike.bibbings at gmail.com
Sun Nov 24 19:36:14 UTC 2019


On 24/11/2019 18:47, Don Brett wrote:
> On 11/24/2019 10:08 AM, Mike Bibbings wrote:
>> On 24/11/2019 14:30, Don Brett wrote:
>>> Does Mythtv do automatic database backups, or do I need to setup my 
>>> own cron job?  Years ago, I thought it did it by itself.
>>>
>>> Don
>>>
>> The packaged versions of mythtv e.g. on Ubuntu should automatically 
>> do a backup weekly, keeping the last 5 backups.
>>
>> Note there is a bug in mythtv 30 in that the backup fails.
>>
>> This has been fixed in mythtv master (31pre).
>>
>> If you want a weekly backup, replace the contents of file 
>> /etc/cron.weekly/mythtv-database
>>
>> with the contents from 
>> https://github.com/MythTV/packaging/blob/master/deb/debian/mythtv-database.cron.weekly
>>
>> Personally, I put the corrected mythtv-database file in 
>> /etc/cron.daily/ for a daily backup.
>>
>>
>> Mike
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>
> I added the updated script to /etc/cron.daily.  It runs manually, but 
> not sure how to get cron to run it on demand for a test.  I'm happy to 
> wait until tomorrow to see the results.  By the way, it doesn't look 
> like the script does the rotate feature, it that done somewhere else, 
> or do I need to add something?
>
>  Don


The mythtv-database script calls /usr/share/mythtv/mythconverg_backup.pl 
which has a built-in default of 5 for backups to keep.

To test manually, this will force all cron.daily jobs to be run:

sudo run-parts /etc/cron.daily

and check that a new database backup has been created.


Mike

sudo anacron -n -d -f


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20191124/229e2a17/attachment.htm>


More information about the mythtv-users mailing list