<br><br><div class="gmail_quote">2008/7/3 mat <<a href="mailto:mat@lessermatters.co.uk">mat@lessermatters.co.uk</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Fellas!<br>
<br>
I've finally decided to upgrade my file/web/mail/smb/nfs/etc server from<br>
a P133 (128M ram) to a faster sleeker 1.3Gig AMD athlon (512M). And I<br>
want to move my myth-backend there too.<br>
<br>
So, how can I easily copy my database from my livingroom PC to my garage PC?<br>
</blockquote><div><br> I use the following script to do a similar thing. I do have the same 'root' password on both databases though:<br><br><---------------- cut<br>#!/bin/bash<br>pass=$2<br>if [ "$2" == "" ];then<br>
read -s -p"Password: " pass<br> echo ""<br>fi<br><br>mysqldump --master-data --add-drop-table -u$1 -p$pass mythconverg | mysql -htsunami -u$1 -p$pass mythconverg<br><---------------- cut<br>
<br>I use it like:<br><br>$ mysqlbackup root<br><br>it then asks for one password.<br><br>You could redirect mysql dump to a file, and then cat this into mysql later on.<br><br>Or if you've got some kind of graphical thingy handy, the mysql-admin gui tool has a fairly easy to use backup facility.<br>
<br>(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.)<br><br>
HTH<br><br>Ian<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Cheers!<br>
<font color="#888888"><br>
Mat<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br>
</font></blockquote></div><br>