[mythtv-users] How do I backup the database without hanging the system?
ylee at pobox.com
Sun Jan 21 20:26:34 UTC 2007
Using a shell script I backup the MythTV database every two hours
to a RAID NAS. When the script runs, the following happens:
1) My frontend seizes up. It won't respond to button presses.
2) The following messages appear in the logs:
DevRdB(0) Error: Driver buffers overflowed
then a few seconds' worth of IOBOUNDs, which I've stamped out
pretty much everywhere else, crops up in the logs. In addition, any
recordings going on at this time lose a segment (one somewhat
larger than the few seconds' worth of IOBOUNDS).
1) is annoying but only lasts for less than a minute if I even notice
it by happening to push a button during the backup process. 2) is more
serious, and which I currently avoid by having the crontab job that
calls the backup job only execute it if there aren't any recordings
Any suggestions as to how to backup the database without freezing the
system during the process? I've tried niceing the script, with no luck.
#Dumps the mythconverg database - daily backup
#Keeps the last 7 days
if [ -a $LOCKFILE ]; then
echo -e "ERROR: Lockfile exists. exiting.\n"
mysqldump -u mythtv -pmythtv mythconverg -c > $BACKUPTO/$DUMPFILE && \
rm -rf $LOCKFILE
 Yes, this is the same Infrant ReadyNAS that for a year served as
my only MythTV recording outlet. With much greater and faster storage
now available elsewhere, it has been a) remade into 1.5TB RAID 5, not
2.0TB RAID 1, and b) is now solely used for backups (although I can of
course always reenlist it for MythTV purposes should I need the space
again, something quite possible later this year.) O, how the mighty
 Crontab line (all on one line):
07 */2 * * *
wget --quiet --output-document=- http://localhost:6544 |
grep -q "and is recording: " || ~/bin/mythdbbackup
Yeechang Lee <ylee at pobox.com> | +1 650 776 7763 | San Francisco CA US
More information about the mythtv-users