List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:January 6 2000 8:48pm
Subject:Re: shutdown mysql when backing up?
View as plain text  
>>>>> "Tim" == Tim Bunce <Tim.Bunce@stripped> writes:

Tim> On Thu, Jan 06, 2000 at 06:40:21AM -0600, Paul DuBois wrote:
>> At 12:26 PM +0000 2000-01-06, Tim Bunce wrote:
>> >
>> >Oracle has a way to take a table (actually a tablespace) 'offline'
>> >via SQL for making hot backups.
>> >
>> >It would be handy if MySQL offered something similar. Perhaps via
>> >a "LOCK tablename OFFLINE" statement that would flush and close the
>> >corresponding table and index files.
>> >
>> >Sounds simple to implement (as an extension to a WRITE lock).
>> >
>> >A backup script could then LOCK OFFLINE and UNLOCK each table in turn
>> >and, while each is locked, copy the corresponding table and index files
>> >to a separate directory.
>> >
>> >A simple and effective hot-backup.
>> >
>> >Monty, is this a good idea or is there a better way?
>> 
>> Would this be different in some way from LOCK READ plus FLUSH TABLES
>> before copying the files?

Tim> Mainly that FLUSH TABLES flushes _all_ tables. Adding a way to
Tim> flush an individual table would be handy.

This would be easy to do.  I shall add it to my todo.

Tim> Also, something I'm not sure of... does MySQL mark table (and index)
Tim> files as being 'stable' when they are closed and check that flag when
Tim> they are reopened? (Like most modern filesystems do?)

The new MyISAM does the first part;  As soon as we have myisamchk
integrated into mysqld we will handle the second part (automatic
checking + repair of tables at reboot)

Tim> If so, if that flag set by just flushing a table?

Yes, the flag is set by doing a flush on the table (as the flush
forces a close of all tables + a reopen on the locked tables).

Regards,
Monty

Thread
shutdown mysql when backing up?hypnos6 Jan
  • Re: shutdown mysql when backing up?Tim Bunce6 Jan
    • Re: shutdown mysql when backing up?Paul DuBois6 Jan
      • Re: shutdown mysql when backing up?Tim Bunce6 Jan
        • Re: shutdown mysql when backing up?Tim Bunce6 Jan
          • RE: shutdown mysql when backing up?Daniel Lafraia7 Jan
            • Re: shutdown mysql when backing up?Tim Bunce7 Jan
        • Re: shutdown mysql when backing up?Michael Widenius7 Jan
          • is update more expensive than insert in Mysql?Cheng-Wei Cheng7 Jan
            • Re: is update more expensive than insert in Mysql?Patrick Greenwell7 Jan
            • Re: is update more expensive than insert in Mysql?Mark Zieg7 Jan
          • Re: shutdown mysql when backing up?Tim Bunce7 Jan
            • Re: shutdown mysql when backing up?Michael Widenius7 Jan
  • Re: shutdown mysql when backing up?Scott Hess6 Jan
    • Re: shutdown mysql when backing up?hypnos7 Jan
Re: is update more expensive than insert in Mysql?wayne_strauss7 Jan
  • Re: is update more expensive than insert in Mysql?Kyle Hayes7 Jan
  • Re: is update more expensive than insert in Mysql?Michael Widenius10 Jan
    • Re: is update more expensive than insert in Mysql?Eric Peters11 Jan
      • Re: is update more expensive than insert in Mysql?Benjamin Pflugmann11 Jan
      • Re: is update more expensive than insert in Mysql?Michael Widenius11 Jan
Re: shutdown mysql when backing up?Fred Lindberg7 Jan