At 12:26 PM +0000 2000-01-06, Tim Bunce wrote:
>On Thu, Jan 06, 2000 at 05:01:39AM +0000, hypnos wrote:
>> I am going to begin backing up important files onto
>> another machine (over NFS). My mysql databases are
>> included in this. I assume the easiest way to do
>> this is just copy everything from my data directory
>> (/usr/local/var/) down. My question is, should I
>> shutdown mysql before I copy these files to the other
>> drive? Or is there a better way to back the files up?
>
>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?
--
Paul DuBois, paul@stripped