[mythtv-users] Moving DB over to another machine

Ian Clark mrrooster at gmail.com
Thu Jul 3 21:45:09 UTC 2008


2008/7/3 mat <mat at lessermatters.co.uk>:

> Hi Fellas!
>
> I've finally decided to upgrade my file/web/mail/smb/nfs/etc server from
> a P133 (128M ram) to a faster sleeker 1.3Gig AMD athlon (512M). And I
> want to move my myth-backend there too.
>
> So, how can I easily copy my database from my livingroom PC to my garage
> PC?
>

 I use the following script to do a similar thing. I do have the same 'root'
password on both databases though:

<---------------- cut
#!/bin/bash
pass=$2
if [ "$2" == "" ];then
        read -s -p"Password: " pass
        echo ""
fi

mysqldump --master-data --add-drop-table -u$1 -p$pass mythconverg | mysql
-htsunami -u$1 -p$pass mythconverg
<---------------- cut

I use it like:

$ mysqlbackup root

it then asks for one password.

You could redirect mysql dump to a file, and then cat this into mysql later
on.

Or if you've got some kind of graphical thingy handy, the mysql-admin gui
tool has a fairly easy to use backup facility.

(The '--master-data' may not be needed, I'm using replication, this is my
'replication has all gone wrong' script, and that switch is used to add the
binary log file position to the backup.)

HTH

Ian

>
> Cheers!
>
> Mat
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20080703/b3c5a862/attachment.htm 


More information about the mythtv-users mailing list