|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Backup question.
From: Joseph Bueno (joseph.bueno
trader.com)
Date: Tue Nov 18 2003 - 05:23:59 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bernard Clement wrote:
> rsynch will do the job correctly only and only if the mysql server on both
> sides are not running. Rsynch does not deal with files opened for writing
> and my guess is that MySQL is opening the database (i.e. files) for writing.
>
It will work without stopping mysql server if you make sure that all
data in memory are flushed to disc and mysql server does not modify
these files while you read them.
This can be done with:
FLUSH TABLES WITH READ LOCK
NB: I assume that you run mysql server on main server only (not on
backup server). If you have mysql server on both systems you can also
use mysql built-in replication : set your main server as master and
the backup server as a slave.
> As for LVM (AKA Logical Volume Manager) I really do not see how it could be
> used to take a snapshot in MySQL. However, I could be wrong here.
>
MySQL manual describes how to make a snapshot with Veritas filesystem
(vxfs). I am sure that it could be done in the same way with LVM (but I
haven't tried it myself):
"If you are using a Veritas filesystem, you can do:
1. From a client (or Perl), execute: FLUSH TABLES WITH READ LOCK.
2. From another shell, execute: mount vxfs snapshot.
3. From the first client, execute: UNLOCK TABLES.
4. Copy files from snapshot.
5. Unmount snapshot. "
(from : http://www.mysql.com/doc/en/Backup.html)
> Bernard
>
Hope this helps,
Joseph Bueno
>
> On Tuesday 18 November 2003 05:12, Simon Green wrote:
>
>>Has any one use LVM to take a snapshot in MySQL and use this to back up
>>data?
>>
>>Simon
>>
>>-----Original Message-----
>>From: Paco Martinez [mailto:pmartinez
heraldo.es]
>>Sent: 18 November 2003 10:00
>>To: Christensen, Dave; 'Richard Reina'; mysql
lists.mysql.com
>>Subject: Re: Backup question.
>>
>>
>>Is there any problem executing "rsync /var/lib/mysql/data/" from one host
>>to another host and therefore having same file in obth machines??
>>
>>Is it unsafe this method ??
>>
>>Could be crashed meanwhile transferring ??
>>
>>Thanks !!!
>>
>>----- Original Message -----
>>From: "Christensen, Dave" <DChristensen
theimg.net>
>>To: "'Richard Reina'" <Richard
rushlogistics.com>; <mysql
lists.mysql.com>
>>Sent: Wednesday, November 12, 2003 10:20 PM
>>Subject: RE: Backup question.
>>
>>
>>>Yes, you can do it like this:
>>>
>>>
>>>Prompt> mysqldump --add-drop-table --host=source.IP.addr.spec -uuser
>>>-ppassword databasename | mysql -uuser -ppassword
>>>
>>>
>>>
>>>I've found that it helps things if you add --no-data to the source side
>>>on the first pass, then remove that clause and run it again.
>>>
>>>Dave
>>>
>>>-----Original Message-----
>>>From: Richard Reina [mailto:Richard
rushlogistics.com]
>>>Sent: Wednesday, November 12, 2003 3:54 PM
>>>To: mysql
lists.mysql.com
>>>Subject: Backup question.
>>>
>>>
>>>I would like to backup databases from a linux MySQL server to another
>>>linux machine on the same private network but I don' see in the docs how
>>>I can do this with mysqlhotcopy or mysqldump. Is there any way to do
>>>this besides using ftp.
>>>
>>>Any help would be appreicated.
>>>
>>>Richard
>>>
>>>
>>>--
>>>MySQL General Mailing List
>>>For list archives: http://lists.mysql.com/mysql
>>>To unsubscribe:
>>>http://lists.mysql.com/mysql?unsub=DChristensen
theimg.net
>>>
>>>--
>>>MySQL General Mailing List
>>>For list archives: http://lists.mysql.com/mysql
>>>To unsubscribe:
>>>http://lists.mysql.com/mysql?unsub=pmartinez
heraldo.es
>>
>>--
>>MySQL General Mailing List
>>For list archives: http://lists.mysql.com/mysql
>>To unsubscribe: http://lists.mysql.com/mysql?unsub=sgreen
eurobell.net
>
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]