[mythtv-users] controlling disk space on "/" on mythtv backend
Jim Abernathy
jfabernathy at outlook.com
Fri Jan 12 13:38:26 UTC 2018
> 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
>
> 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.
Thanks, I've left the weekly backup the system installed as is. I added
the daily and changed the backup locations and temp directories.
So we'll see what happens.
Thanks again.
Jim A
> _______________________________________________
> 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