[mythtv-users] mythtv database - backup and size questions

John Drescher drescherjm at gmail.com
Mon Jan 1 18:37:23 UTC 2007


On 1/1/07, devsk <funtoos at yahoo.com> wrote:
>
> I didn't find much information on the list, so here I am asking. Please
> excuse if its a dupe.
>
> I was trying to see how to best backup my mythtv setup and current database
> like recorded shows, cutlists etc. I did a 'mysqldump -u mythtv -pmythtv
> mythconverg -c > mythtv_backup.sql' and noticed that the file was just
> 17MBytes, whereas 'du -sk /var/lib/mysql' returned 470MBytes.
>
> So, I have two questions:
>
> 1. Is 'mysqldump -u mythtv -pmythtv mythconverg -c > mythtv_backup.sql' a
> complete backup for a myth setup? I plan to do this everyday in a cron job
> and keep it with the other complete install backup which I do whenever I do
> major upgrades.
>
This is what I do.

>
> 2. What are those <hostname-bin.xxxx> files in /var/lib/mysql and why is
> that dir so huge compared to the database size? Is that preallocated
> database files? Is that the directory I should be backing up?
>
I believe these are not needed.

http://dev.mysql.com/doc/refman/5.0/en/binary-log.html

BTW here is my cron job:

# cat /etc/cron.daily/mythbackup.cron

#!/bin/sh
date=`date -I`
mysqldump mythconverg | bzip2 -c  > /var/backup/backup-$date.sql.bz2

John


More information about the mythtv-users mailing list