George Herson said:
> James G. Sack (jim) wrote:
>
>>On Mon, 2005-09-19 at 13:14 -0400, George Herson wrote:
>>
>>
>>>James G. Sack (jim) wrote:
>>>
>>>
>>>
>>>>On Mon, 2005-09-19 at 12:15 -0400, George Herson wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Dear Jim,
>>>>>
>>>>>Re: your post at http://lists.mysql.com/mysql/189058, why bother
>>>>> creating the mysqldump if you already have the snapshot?  Why not
>>>>> just  backup the snapshot?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>[...]
>>>>
>>>>The output of mysqldump *is* the backup. If the db goes away, it can
>>>> be restored with (something like) "mysql <dumpfile.2005-09-01".
>>>>
>>>>The dump operation is run periodically, and some number of back
>>>> versions can be kept around (or offloaded) for archival value.
>>>>
>>>>
>>>>
>>>>
>>>Yes, but can't you also save your snapshot instead, then, when/if you
>>> want, restore it,
>>>
>>>"4. mount the snapshot
>>>
>>> 5. load a second database server daemon accessing the db within the
>>>snapshot (with a suitable alternate my.cnf file)
>>>
>>> 6. perform mysqldump operation on the snapshot-db" ??
>>>
>>>..
>>>
>>>
>>
>>George, LVM snapshots are generally intended to be short-lived --
>>
>>
> <snip>
>
>>..jim
>>
>>
>>
> Jim,
>
> I didn't word my question quite right because I was only guessing at
> what a LVM snapshot was. Moreover, what you're saying is all correct.
> However, I was not suggesting that the snapshot be kept around once the
> backup is made.
>
> Let's go to article "What is a Logical Volume Manager (LVM) snapshot and
>  how do I use it?
> <http://kbase.redhat.com/faq/dml_fetch.pl?CompanyID=842&ContentID=4097&FaqID=3640&word=What%20is%20a%20Logical%20Volume%20Manager&faq_template=http://kbase.redhat.com/faq/searchfaq.shtm&topic=80&back_refr=http://kbase.redhat.com/faq/&topicname=AS/ES/WS%20Basics&Id=&Instance=&Shared=>"
>  in the RedHat k'base
> <http://www.redhat.com/apps/support/knowledgebase/>.  It says "After
> performing the backup of the snapshot partition we release the
> snapshot".  This implies, at least to me, that one doesn't need a 2nd
> database server or to do a mysqldump (your steps 5-7).  Instead, we just
>  tar cv /mnt/ops/dbbackup (to use the article's example name for the
> mounted snapshot), save the tape, and dispense with the snapshot.
> Wouldn't that work?  MySQL keeps its data in files already, so why is it
>  necessary to mysqldump it?  Are you only trying to avoid having to also
>  backup the mysqld version that wrote the data files to ensure that
> these  can be read later?
>
> George
The LVM snapshot will hold the state of the database as it is written to
the  disk.  However, the database engine may have to write several things
to the disk to ensure consistency (e.g, main table and index). If you take
the snapshot between these two operations the database will be in an
inconsistent state.  Mysqldump locks the tables before performing a dump
to prevent this.



-------

William R. Mussatto, Senior Systems Engineer
http://www.csz.com
Ph. 909-920-9154 ext. 27
FAX. 909-608-7061



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to