[mythtv-users] controlling disk space on "/" on mythtv backend

Jim Abernathy jfabernathy at outlook.com
Fri Jan 12 12:44:38 UTC 2018



On 01/11/2018 08:14 PM, Stephen Worthington wrote:
> On Thu, 11 Jan 2018 21:08:11 +0000, you wrote:
>
>> On 12 January 2018 5:49:42 am Jim Abernathy <jfabernathy at outlook.com> wrote:
>>
>>>
>>> Question on the cron job for db backup.  Is this setup on install of mythtv?  I have not created a cron job to do this. But there are a few backups in /var/lib/mythtv/db_backups and I have not run the backup manually yet. I just now ran:
>>>      /usr/share/mythtv/mythconverg_backup.pl
>>> It puts the backup in the directory that I specified in Storage Directories in setup.  I just don't know if it's running automatically.
>>>
>>> Jim A
>>>
>>>
>> As I understand it, no the cron backup is not created automatically by mythtv. However when it does database upgrades it will try very hard to run a backup before doing the upgrade. That may be the few files you see.
> I believe the cron job for optimise/repair was created by Mythbuntu
> Control Centre.  So if you have used that in the past, you are likely
> to have set it up that way.  But as MCC is no longer supported, anyone
> now doing a new install will need to set it up manually.
>
> To install the optimise/repair job on Ubuntu, all you have to do is
> this (as root or using sudo):
>
> cp -a
> /usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl
> /etc/cron.daily/optimize_mythdb
I must not have something installed I have no directory:
/usr/share/doc/mythtv-backend
And I can't find the file optimize_mythdb.pl

Jim A

> For the database backup job, here is the standard
> /etc/cron.weekly/mythtv-database file, which is installed by the
> mythtv-database package:
>
> #!/bin/sh
> # /etc/cron.weekly/mythtv-database script - check and backup
> mythconverg tables
> # Copyright 2005/12/02 2006/10/08 Paul Andreassen
> #                      2010 Mario Limonciello
>
> set -e -u
>
> DBNAME="mythconverg"
> DEBIAN="--defaults-extra-file=/etc/mysql/debian.cnf"
>
> /usr/bin/mysqlcheck $DEBIAN -s $DBNAME
>
> /usr/share/mythtv/mythconverg_backup.pl
>
> /usr/bin/logger -p daemon.info -i -t${0##*/} "$DBNAME checked and
> backed up."
>
> # End of file.
>
> I prefer to do my database backups daily, and direct them to be stored
> on my Windows box over the network.  So I have his in
> /etc/cron.daily/mythtv-backup:
>
> #!/bin/sh
> # /etc/cron.weekly/mythtv-database script - check and backup
> mythconverg tables
> # Copyright 2005/12/02 2006/10/08 Paul Andreassen
> #                      2010 Mario Limonciello
>
> # JSW Modified for /etc/cron.daily backups to a network drive.
>
> set -e -u
>
> DBNAME="mythconverg"
> DEBIAN="--defaults-extra-file=/etc/mysql/debian.cnf"
>
> # Debug:
> /usr/bin/logger -p daemon.info -i -t${0##*/} "Debug: $DBNAME
> cron.daily checking started."
>
> /usr/bin/mysqlcheck $DEBIAN -s $DBNAME
>
> # Debug:
> /usr/bin/logger -p daemon.info -i -t${0##*/} "Debug: $DBNAME
> cron.daily checking finished, backup starting."
>
> /usr/bin/nice -n 2 /usr/local/bin/mythconverg_backup_jsw.pl
> --directory "/mnt/savaidh/ldrive/Backups/MythTV_db_backup/mypvr"
> --tempdir "/mnt/ssd1/tmp"
>
> /usr/bin/logger -p daemon.info -i -t${0##*/} "$DBNAME checked and
> backed up."
>
> # End of file.
> _______________________________________________
> 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



More information about the mythtv-users mailing list