#!/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 and lower priority. set -e -u DBNAME="mythconverg" DEBIAN="--defaults-extra-file=/etc/mysql/debian.cnf" #USER="mythtv" USER= NICE="/usr/bin/nice -n 2" /usr/bin/logger -p daemon.info -i -t${0##*/} "Debug: $DBNAME cron.daily checking started." $NICE /usr/bin/mysqlcheck $DEBIAN -s $DBNAME if [ -e "/etc/default/mythtv-backend" ]; then . /etc/default/mythtv-backend fi if [ -z "${USER:-}" ]; then CMDPREFIX="" else CMDPREFIX="sudo -H -u $USER" fi $CMDPREFIX $NICE /usr/local/bin/mythconverg_backup_jsw.pl --directory "/mnt/savaidh/gdrive/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.