mysql question
Paul Melson
melson@scnc.holt.k12.mi.us
Mon, 17 Jul 2000 07:26:10 -0400
On Mon, Jul 17, 2000 at 06:05:21AM -0400, Adam wrote:
> When mysqld is running does it make sure it keeps the database files in an
> uncorrupted state, or are there times when if you make a copy of it with
> mysqld running you would get a damaged copy because you didnt stop
> it? Basically I'd like to know if I can just tar the db files whenever I
> want without affecting the database operation, or if I need to "pause" it
> somehow to be 100% safe? Thanks.
If there are records locked and/or open in your
database when you try to `cp` it, then you will
get errors and possibly corrupt the database.
I can only imagine that this applies to `tar`
as well. If you're looking to automate a backup
process, simply add the following lines to your
backup script:
# prior to `tar`
/usr/local/mysql/scripts/mysql.server stop
# after `tar`
/usr/local/mysql/scripts/mysql.server start
PaulM
--
_____________________
melson@holt.k12.mi.us